davidcox / plotsk Goto Github PK
View Code? Open in Web Editor NEWA simple Python library for plotting data in a web browser -- NOT READY FOR PRIME TIME
License: MIT License
A simple Python library for plotting data in a web browser -- NOT READY FOR PRIME TIME
License: MIT License
The SVG is already getting generated by D3, so pulling this out and saving it would be straightforward. PDF export could be achieved via a tool like wkhtmltopdf.
Given that data series have a "unit" parameter, it should be possible to handle multiple scale "frames" for over-plotted data series with different units
I set up plotsk as described in the readme file. Everything ran through without errors. When I try to run the test I get the following error message:
Tuerkeil:test thorse$ python simple_test.py
simple_test.py:2: SyntaxWarning: import * only allowed at module level
def simple_test():
calling rsync -a "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotsk-dev-py2.7.egg/plotsk/resources/skeletons/range_frame/" "/var/folders/lt/1mvthvyx3vbfchv8x8jm7gsr0000gn/T/tmpXrgeOl"
calling coffee -c /var/folders/lt/1mvthvyx3vbfchv8x8jm7gsr0000gn/T/tmpXrgeOl/scripts
Traceback (most recent call last):
File "simple_test.py", line 23, in
simple_test()
File "simple_test.py", line 19, in simple_test
p.show()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotsk-dev-py2.7.egg/plotsk/plot.py", line 132, in show
pth = self.bake()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotsk-dev-py2.7.egg/plotsk/plot.py", line 144, in bake
self.deploy_skeleton(target_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotsk-dev-py2.7.egg/plotsk/plot.py", line 124, in deploy_skeleton
coffeescript_compile(target_path)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotsk-dev-py2.7.egg/plotsk/util.py", line 64, in coffeescript_compile
syscall(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/plotsk-dev-py2.7.egg/plotsk/util.py", line 50, in syscall
return subprocess.call(shlex.split(str(cmd)))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 493, in call
return Popen(_popenargs, *_kwargs).wait()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in init
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Tuerkeil:test thorse$
The line 132 in plot.py where the error seems to be produced, consists of the command:
pth = self.bake()
Best regards,
Thorsten Rissom
Could work in a similar manner to showboat. An interesting use case for this is when you are doing analyses on a server / cluster, but want to view analysis plot results on your local machine.
Currently not handled
Infrastructure for combining multiple subplots into a single display (and possibly sharing the same data.json) would be nice. Simple div-based layout probably covers a large fraction of use cases, though fancier situations are easily imaginable (e.g. arrays of paired plots, with shared axes.
A la showboat, it might be possible to embed a browser-based SVG editor, thus allowing a layer of arbitrary SVG annotations. Would need to think about the right way to save that "overlay"...
Either needs support in the current 'range_frame' skeleton, or needs its own, new skeleton
Would be nice to have zooming, panning, and display-value-when-hovering support. There could be a parameter controlling whether these are enabled or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.