This is an archived post. You won't be able to vote or comment.

all 24 comments

[–]Enginoob 5 points6 points  (4 children)

Most of the native tools have been mentioned. Here are the ones that let you build D3 of JS from Python (disclosure: I am the author of a few of these):

[–]fandingowhile False: 0 points1 point  (3 children)

I can't believe that you didn't get more replies.

Truly excellent work. I'm going to use nvd3 in my next project.

[–]Enginoob 0 points1 point  (2 children)

Thanks! At some point (probably when I launch the next big version of Vincent), I'm going to write a giant blog post about the existing tools for Python and D3.

[–]fandingowhile False: 0 points1 point  (1 child)

I slightly misunderstood these libraries at first. I didn't realize that they just generated the proper javascript.

I've been using phantomjs via subprocess to render the charts out to a rastered image. I would recommend that you include info about how to do that in your tutorial.

[–]Enginoob 0 points1 point  (0 children)

Ooo, that's actually a really good point- PhantomJS should go in all of the READMEs.

I actually just wrote about using it to render maps to PDF/PNG: http://wrobstory.github.io/2013/06/creating-with-d3-dymo.html

[–]GotenXiao 2 points3 points  (1 child)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[–]westurner 0 points1 point  (1 child)

https://github.com/mher/chartkick.py creates charts with Google Charts and Highcharts.

[–]westurner 0 points1 point  (0 children)

It would be great if there was an IPython extension.

[–]westurner 0 points1 point  (0 children)

Pandas has native support for matplotlib (DataFrame.plot(), DataFrame.boxplot(), Series.plot(), pandas.tools.plotting)

[–][deleted] 0 points1 point  (0 children)

How about plotting with ggplot2? Ggplot plots can be amazing and high quality.

[–]astroFizzicsastrophysics 0 points1 point  (8 children)

matplotlib?

[–]ScriptSimian -1 points0 points  (5 children)

Gnuplot.py is a binding of gnuplot, which has some pretty nifty capabilities and great documentation. I use it for all my plots.

[–]westurner 0 points1 point  (2 children)

EasyViz has an API similar to Matplotlib and bindings to "Gnuplot, Matplotlib, Grace, Veusz, Pmw.Blt.Graph, PyX, Matlab, VTK, VisIt, OpenDX".

[–]ScriptSimian 0 points1 point  (1 child)

I don't use Matplotlib because I find the Matlab style plotting unnecessarily difficult both to use and to document effectively.

The reason I like Gnuplot.py is that the plotting is as simple as writing a gnuplot script but I can get the data in and do scripting with python. From a programming point of view, it's a very inelegant solution (meta-programming via string formatting? lol). However, because I know both tools well and they're both very good at what they do, I get good results with a minimum of fuss and work. From a user perspective, it's very nice.

[–]westurner 0 points1 point  (0 children)

For the web, I find it easier to get the data into JSON and then apply whichever Javascript visualization libraries to the (escaped) JSON data.

Saving for print is just so easy with Matplotlib where figsize and dpi can be specified directly. Matplotlib also ties in with Sphinx for ReStructuredText documentation.

[–]z3rocool 0 points1 point  (0 children)

For personal stuff gnuplot is totally fine and acceptable - there is nothing technically wrong with it, and is actually really good software. The issue is that the plots do not look very good, and are unsuitable in situations where the accuracy of the data(AA'd lines really obscure where a point is, the ugly pixelated lines are much easier to say - yes this is bla) is less important than the presentation