A Comparison of the Plotting Softwares May 23, 2009Posted by keithkchan in Whatever.
We need to plot some graphs from time to time. A good plotting tool is very important, in particular when you are going to put some graphs in the paper.
There are many plotting softwares available. However, I am a fan of the open software, and try my best not to use the commercial softwares, like Matlab and Origin, in plotting. Besides saving money, I admire the cause of open softwares. So far I can limit myself to using only open softwares happily (except Mathematica). So I will only talk about the open softwares only.
xmgr is a graphical (GUI) plotting tool. Since it is GUI, it is relatively easy to start with. The quality is also good, as far as I remember. For those who used to use GUI, this is a good choice. But somehow I stop using it because it is not installed on the Linux system here at NYU. (Is it xmgr less popular than two other plotting tools? Is it not a routine part of the Linux distribution?)
Both gnuplot and matplotlib are script plotting tools. I think it is harder to begin with, in particular for people still live in the Windows world. If you use Linux or Mac, you probably are familiar with terminal and command-line approach already. I used to use Windows, and I found it pretty hard to accept the command-line softwares at that time. After quitting Windows, I am quite comfortable with scripts now. Of course, you don’t type the scripts every time. The first plot may be painful and time-consuming as you need to find out the appropriate commands to polish your graph. The second plot is going to be similar so you just need to copy from your old scripts. In the long run, the time required should be similar to, if not less than, the GUI plotting tool. I believe that the real master would use the scripts.
gnuplot is a sole plotting tool. The basic commands are easy to find online. I have been using it for some time. However, I (and some of my colleagues) find that the graphs from gnuplot still fall short of the publishing standard. Below I show the same data plotted using gnuplot and matplotlib respectively. Which one looks nicer?
I find the second one looks better, and it is plotted by matplotlib. If you think otherwise, I have nothing to say. matplotlib starts its life as a mimick of matlab, and it is a library in python. As you may know, python is a rather popular scripting language. To use it you have to import the matplotlib library in python. However to install the library may not be so easy, depending on your system. If you use Windows or Mac, you can install it easily using the Enthought Python Distribution, which is free for educational purpose. Certainly I satisfy this condition. I heard that installing it on Linux is pretty tricky. On one hand since it is just a library in python, you need to know the language python a little bit also, the potential barrier to overcome is higher than that for gnuplot. For example, I need to plot some graph using the columns of data in an ASCII file, I find it ridiculously complicated to do. It took me quite some time to google how to do it. On the other hand, as it is just a library in python, learning how to plot a graph using matplotlib you in fact have also started learning the python language. Isn’t it one stone two birds?
So what’s the conclusion? Which one is better? There is no conclusion. It is up to you to decide. I will use both gnuplot and matplotlib whenver convenient.