Search code examples
pythonmatplotlibgnuplotgraphing

gnuplot vs Matplotlib


I've started on a project graphing Tomcat logs using gnuplot-py, specifically correlating particular requests with memory allocation and garbage collection. What is the collective wisdom on gnuplot-py vs Matplotlib for Python graphing. Are there better graphing libraries out there I haven't heard of?

My general considerations are:

  • While gnuplot has large amounts of documentation, gnuplot-py doesn't. How good is documentation community for Matplotlib?
  • Are there things which gnuplot can do, but gnuplot-py can't?
  • Does Matplotlib have better Python support?
  • Are there are big show stopping bugs in either? Annoyances?
  • Currently gnuplot is graphing 100,000's of points, I'm planning on scaling this up to millions. Should I expect problems? How well does Matplotlib handle this?
  • Ease of use, turnaround time for gnuplot vs Matplotlib?
  • How easy would it be to port existing gnuplot-py code to Matplotlib?

How would you approach this task?


Solution

    • You can check matplotlib's documentation yourself. I find it quite comprehensive.
    • I have very little experience with gnuplot-py, so I can not say whether it can do all gnuplot can.
    • Matplotlib is written in and designed specifically for Python, so it fits very nicely with Python idioms and such.
    • Matplotlib is a mature project. NASA uses it for some stuff.
    • I've plotted tens of millions of points in Matplotlib, and it still looked beautiful and responded quickly.
    • Beyond the object-oriented way of using Matplotlib is the pylab interface, which makes plotting as easy as it is in MATLAB -- that is, very easy.
    • As for porting from gnuplot-py to matplotlib, I have no idea.