Settings

Theme

Show HN: Python library with Matlab-like functions for creating JavaScript plots

github.com

5 points by sendos 9 years ago · 3 comments

Reader

sendosOP 9 years ago

This is a library that provides access to Matlab-like plotting functions for easily creating javascript plots from within Python.

No need to deal with HTML, Javascript, or CSS to get some plots with multiple linestyles, colors, markers, and labels. Just plain Python code and a simple plotting syntax. The currently supported Javascript plotting libraries are Flot and NVD3 (which is a wrapper around D3).

One use case for this library is to have Python scripts running automatically and updating websites that serve Javascript plots to visitors.

For example, we used this library to create and update the plots on prespredict.com. During US presidential election seasons, a cron job calls the plotting script daily, which automatically updates the plots on the website with data from the latest polls.

The resulting scripts may not be "Pythonic" enough, but I was aiming for the simplicity of creating plots that Matlab has.

saamm 9 years ago

This is neat! Have you tried to get it running in a Jupyter notebook?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection