Gnuplot vs Matplotlib

I started to draw a Tomcat project using gnuplot-py , in particular, mapping specific requests to memory allocation and garbage collection. What is gnuplot-py vs Matplotlib collective wisdom for Python graphical rendering. Are there any better graphics libraries that I haven't heard of?

My general thoughts:

  • While gnuplot has a lot of documentation, gnuplot-py does not. How good is the documentation community for Matplotlib?
  • Are there any things gnuplot can do, but gnuplot-py cannot?
  • Does Matplotlib have better Python support?
  • Are there big stopping stops in both? Annoyed?
  • Gnuplot currently displays 100,000 points, I plan to scale it to millions. Should I expect problems? How well does Matplotlib do this?
  • Ease of use, processing time for gnuplot vs Matplotlib?
  • How easy would it be to port existing gnuplot-py code to Matplotlib?

How do you approach this task?

+63
python matplotlib logging gnuplot graphing
May 26 '09 at 16:49
source share
7 answers
  • You can check the matplotlib documentation yourself . I find it quite complete.
  • I have very little experience with gnuplot-py, so I can’t say if it can do all of gnuplot.
  • Matplotlib is written and developed specifically for Python, so it works very well with Python idioms, etc.
  • Matplotlib is a mature project. NASA uses it for some things.
  • I earned tens of millions of points at Matplotlib, and he still looked handsome and reacted quickly.
  • Besides the object-oriented way of using Matplotlib - the pylab interface, which makes projecting as simple as in MATLAB - is very simple.
  • Regarding porting from gnuplot-py to matplotlib, I have no idea.
+41
May 26 '09 at 17:12
source share

Matplotlib = ease of use, Gnuplot = performance

I know that this post is old and answered, but I passed by and wanted to put my two cents. Here is my conclusion: as said above, if you have a not very large data set, you should use Matplotlib. It is simpler and looks better. However, if you need performance, I would recommend using Gnuplot. The following graph is the required time to build and save random scatterplots and their explanations.

Gnuplot VS Matplotlib

In addition, as indicated in the comments, you can get equivalent story quality. But you have to sweat to do this with Gnuplot.

+30
May 27 '14 at 7:21
source share

matplotlib has pretty good documentation and seems to be pretty stable. The graphs he produces are beautiful - the "quality of publication" is for sure. Due to the good documentation and the amount of sample code available on the Internet, it is easy to learn and use, and I don’t think you will have many problems translating gnuplot code to it. In the end, matplotlib is used by scientists to build data and prepare reports, so it includes everything you need.

One notable advantage of matplotlib is that you can integrate it with Python GUIs ( wxPython and PyQt , at least) and create a graphical application with good graphics.

+19
May 26 '09 at 17:09
source share

After using GNUplot (with my own Python shell) for a long time (and really don't like the 80s output), I just started looking at matplotlib. I have to say that I really like it, the result looks very beautiful, and the documents are of high quality and extensive (although this also applies to GNUplot). The only thing I spent searching matplotlib documents is how to write to the image file, not the screen! Fortunately, this page explains it pretty well: http://www.dalkescientific.com/writings/diary/archive/2005/04/23/matplotlib_without_gui.html

+14
Dec 25 '09 at 10:01
source share

I played with both and I like Matplotlib much better in terms of integration, options and quality of Python charts / graphs.

+8
May 26 '09 at 17:15
source share

What Gnuplot can do Gnuplot-Py can do too. Because Gnuplot can be controlled using pipe (pgnuplot). Gnuplot-Py is just a thin layer. Therefore, you do not need to worry about it.

Why do I prefer gnuplot, maybe a lot of output formats (PDF, PS and LaTex), which is very useful in documents, and the default output looks more scientific :)

+4
Mar 02 '13 at 14:29
source share

About performance and building a large number of points: I compared this for a scatter chart of 500,000 points loaded from a text file and saved in png using gnuplot * and matplotlib.

 500.000 points scatterplot gnuplot: 5.171 s matplotlib: 230.693 s 

I ran it only once, and the results did not look the same, but I think the idea is clear: gnuplot wins when it comes to performance.

* I used gnuplot directly because the gnuplotpy daemon does not work for me. Matplotlib wins with Python integration.

+4
Jan 10 '15 at 21:26
source share



All Articles