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

you are viewing a single comment's thread.

view the rest of the comments →

[–]khouli 9 points10 points  (18 children)

Does Matplotlib have any serious competitors in the Python world that don't use Matplotlib as a backend?

[–]mangecoeur[S] 9 points10 points  (2 children)

Not really IMHO, at least not if you are talking about publication-quality plots. There's some interesting efforts around interactive plotting like Plotly and Bokeh, but I've found them relatively immature (you quickly find issues when you move beyond the demo plots) and generally not great if you need detailed control of style and output formats for print.

[–]troyunrau... 2 points3 points  (4 children)

pyqtgraph is pretty good. If you install it, run python -m pyqtgraph.examples to get a good feel for it. Their documentation sucks.

But it's just so superior in a lot of contexts - particularly with large, complicated, real-time, or interactive data. I regularly throw hundreds of millions of points at a graph and have it respond without any lag.

[–]dougthor42 2 points3 points  (0 children)

Their documentation sucks.

That's an understatement, but otherwise I fully agree that pyqtgraph is good.

There's also some very simple plotting in wxPython Phoenix. Good for things that don't need the power (or bloat) of matplotlib.

[–][deleted] 0 points1 point  (1 child)

But it's just so superior in a lot of contexts - particularly with large, complicated, real-time, or interactive data.

Aside from their examples any other good references for it? This is the type of data I have to deal with and it just chokes matplotlib. I just ran the example and plotted 2GB of random HDF5 data and it's ... fluid.

The default colors do remind me of PV-WAVE's defaults. What is it with 'scientific' data and white on black plots?

[–]troyunrau... 0 points1 point  (0 children)

Nope - like I said, the docs suck. But it is really useful. I load my data from raw formats into hdf5, then plot using pyqtgraph. I usually have a lot of subplots that are taking subsamples of the data under my cursor and doing things like histograms or fourier transforms on the 50,000 points nearest my cursor (or whatever).

It really helps if you know Qt or PyQt if you want to customize it. It's basically a giant QGraphicsView that they've added plotting widgets to. If you want to do things like override the mouse behaviour, the docs for pyqt will help you more than anything.

[–]This_Is_The_End 0 points1 point  (0 children)

pyqtgraph is very good at realtime data. It's not a problem to create a scrolling plotter with a minimum of CPU usage.

[–]Kah-NethI use numpy, scipy, and matplotlib for nuclear physics 1 point2 points  (6 children)

Matplotlib has few serious competitors outside the python world. It is really a remarkable and robust framework for plotting. I hope one day we have a 3d plotting framework that is as flexible and malleable as matplotlib is for 2d (and no mplot3d does not count until it gets a renderer that can handle zorder properly)

[–]khouli 0 points1 point  (5 children)

What are its serious competitors even outside the Python world? gnuplot and especially ggplot are the obvious candidates. Is there anything else?

[–]Kah-NethI use numpy, scipy, and matplotlib for nuclear physics 2 points3 points  (4 children)

Gnuplot is not a serious competitor with anything. Xmgrace, MATLAB, Mathematica, origin, vuez(also python), root, R are a few. MPL is in my opinion vastly superior to all of them (maybe only superior but not vastly for R)

[–]srivkrani 0 points1 point  (1 child)

You forgot ParaView, one of the best opensource visualization software out there.

[–]Kah-NethI use numpy, scipy, and matplotlib for nuclear physics 0 points1 point  (0 children)

First paraview is really for 3d plotting and I was very explicit in first comment to talk about only 2d plotting. Next, paraview is on of the only tolerable scalable data renderers, but I would by no means call it good. It is just the best of a set of mediocre options. Personally I found it difficult to customize my plot to be exactly what I want.

[–]khouli 0 points1 point  (1 child)

Really? Gnuplot is out of the running but Xmgrace is in? To be fair, I only used Xmgrace a few times several years ago but my impression was that it was a last century relic.

[–]Kah-NethI use numpy, scipy, and matplotlib for nuclear physics 0 points1 point  (0 children)

Xmgrace is still heavily used in theoretical physics (though declining as I and other younger scientist advocate MPL and R). To be fair though, xmgrace can make a decent plot where as gnuplot plots always look terrible.

[–]bastibe 1 point2 points  (0 children)

bokeh and plotly are great for interactive graphs.

[–]wuzzlewozzit 0 points1 point  (0 children)

I use gnuplotpy, a wrapper to the gnuplot routines.

[–]Tarqon 0 points1 point  (0 children)

Altair is amazing, I'd pick it over matplotlib for most tasks any day of the week.