Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login



sort by: page size:

There used to be lot of hype on HN around the new statistical language Julia, not sure how far ahead and how good that thing actually is.

You can do a lot of good with scipy (especially scipy.stats), but I feel like matplotlib's plotting is still behind R.


Matplotlib is like democracy, the worst option except all the other options. I do production quality plots for technical reports and matplotlib is the only suitable python library I've found that gives me the control I need. Like you say, there are lots of other libraries that combine stats (or other data analysis) and plotting. The paradigm I always use is to do the analysis separately, and plot the final result focusing on presentation and formatting.

Matplotlib is the best I can find for this, despite the sometimes clunky interface. GNUplot is also good, but its easier to have a native python library.

One more thing I'll say that had heavily biased me, I started off with Matlab, and I find that matplotlib is the closest to Matlab plotting, which is a lot of why I like it.


Thanks for the reply. I agree that Matplotlib is too complex. I'd abandon Python today if Julia had simple charting in stdlib, but practically nothing does outside .NET (sadly, I'm not a fan).

matplotlib makes fantastic plots, it's just not a very nice API.

Seaborn is quickly becoming my favourite and a bit more similar to ggplot in terms of scope.


Check out the PyCall[1] and PyPlot[2] packages, then. Julia has pretty good integration with python. I've been pretty happy calling matplotlib from julia. (You probably already know about these packages, but just in case you didn't...)

[1]: https://github.com/stevengj/PyCall.jl

[2]: https://github.com/stevengj/PyPlot.jl


It's true that using matplotlib in Julia (via PyPlot.jl) is some sort of a hack. However, it works surprisingly well!

Yes, there are many good alternatives. Seaborn, Plotly, and many more. I still use Matplotlib for most things (with the OO API), as I can control its fine details and it's more versatile. For non-graph visual things that I could use Matplotlib for, I've been generating SVGs and displaying them directly in Jupyter notebooks (with Cairo is one option, but just directly is pretty easy too).

While I agree with you that matplotlib should be replaced , I see a problem in that almost all these new plotting libraries are focused on plotting statistical type data. While this is obviously a big thing at the moment, more traditional type graphs are often not well catered for by these libraries. For example I work in signal processing and would like good looking line and 3d graphs with easy layout of multiple plots... Matplotlib despite its shortcomings is still the best tool for this.

Assuming all you want to do is make some graphs, almost every alternative is better. Matplotlib is like the opengl of plotting libraries, there's almost no abstraction, you have to create plots in an imperative way and it's extremely verbose.

A plotting library focused on useability should let you specify what you want in a declarative manner, then get out of your way. Ggplot2 being the prime example.


Actually, for plotting I prefer to use PyPlot in Julia which is based on matplotlib which is very mature and complete in my opinion. I tried to use other (more native) plotting packages like GR, Plots and Makie but they did not provide all the plotting types I needed or where to rough around the edges.

In any case, I am looking forward to new julia versions which should address the delay in plotting (as far as I known).


tell me you find any. I use matplotlib as I have not found an alternative.

Of all the python plotting packages I have tried, matplotlib is still my favorite. A large part of this is that's one of the few that doesn't insist on using a web browoser. My only complaint with it is I wish the plots were more interactive. What I really want is the speed and API of matplotlib with the interactivity of plotly but without the web browser. I think matlab may be the only thing that comes close to that.

I've always hated matplotlib, even though it gets the job done. The graphs are ugly by default, and the API would be unusable if it weren't for StackOverflow. Maybe I just need to sit down and learn it really well.

Anyway, this seems cool.


There's more to python plotting than matplotlib. Check out plotnine for example

I do agree though that pandas can be a pain sometimes...


I’m a long term Matlab user and I’ve been using Matplotlib more and more recently. This is partially out of frustration with recent changes to Matlab graphics and also a desire to use more open source tools.

Matlab plotting is extremely powerful and versatile. Sometimes the output could be nicer but the interactive figure hierarchy is great. Matplotlib on the other hand is, at least to me, a lot more clunky to work with. But it gets the job done and the output often looks nicer and solves my gripes with Matlab.


Pandas has the best plotting for NumPy... and matplotlib for that matter.

Seaborn in Python to make matplotlib pretty by default + plot some uncommon graphs. `%matplotlib widget` to make matplotlib interactive. Plotly in Python if you want decent graphs that are also interactive by default.

Observable if you want an interactive, hosted visualization notebook (and all their libraries are open source, except their UI). Plotly, Observable's Plot library, or D3 if you don't mind JavaScript. Can bundle libraries + data + visualization into a single html file and deliver that as an interactive report; once you have the base template down it's decently ergonomic.

Plotly is my current default when I'm working with Jupyter, though. Sane defaults are nice.


Compared to Matplotlib? Is that a good benchmark for plotting?

matplotlib is very flexible and has a wide array of plot types. It's great for quickly making plots of some data in Python. But IMO the output is not really nice to look at, it takes a lot of customization to make the plots publication-quality, and it feels kind if clunky for making interactive plots (however, some animation support was added recently, I haven't looked at that in deail yet).

The screenshots of protovis/d3 look very promising, I'll have a look at it. The last time I needed a JS charting library I went with Highcharts, as it had somewhat better support for the run-of-the-mill chart types I was using in my project.

next

Legal | privacy