30 de abril de 2007

Plotting

Making publication-quality plots is one of the ugly parts in the life of a scientist wannabe. In my field there are two main plotting packages in use (besides IDL which i don't have): SuperMongo and PGPLOT.

Both are quite old. I guess the best of them must be SuperMongo, since its lemma is "You can't beat SM.". Joking aside I can't give an unbiased opinion, since all the times that I have tried to use SM, I have hit a wall of uneasiness. The syntax is too different from everything else that I know.

That leaves us with... erm well, PGPLOT and PLplot. Since my main computing environment has come to be Octave running on Ubuntu, I thought that it would be good to give PLplot a drive, after all it has pre-compiled packages and it's supposed to work fine from within Octave. Another advantage is that it's built to be very similar to PGPLOT, which I had used in the past. After fighting with it for some hours I can say that it is not ready for prime-time. Some of the problems I found while using it:


  • The gnome server won't work. That leaves us with the xwin server which is incapable of redrawing itself (a PITA if you are working from a full-screen terminal).

  • Issuing plend() to close the active plotting window will make Octave segfault if actually there's no such window. Hey, I made a mistake! But no need to punish me so hard.

  • The output is... well not-as-good-as-I-would-like. If you print directly to a Postscript device, some Hersey symbols (like the Sun's symbol $\odot$ in LaTeX) won't be drawn. If you plot to the xwin server and then save the output with save_fig, the result is ugly. All the letters and symbols are squashed and o's (supposed to be a round and in fact round on screen) appear as ellipses on the Postscript.



Those were the most important so, repeat after me: "You can't beat PGPLOT (unless you are SuperMongo, of course)". The final result, I'm using PGPLOT from inside Octave with the help of the matwrap tool. No need to make specific programs and compile them to plot your data. Works like a charm, it's much more solid than PGPLOT and the output has that fancy professional look that only SM and PGPLOT can attain.

Now I'm a believer, I won't doubt again about how to make my plots.

2 comentarios:

Anónimo dijo...

"I'm using PGPLOT from inside Octave with the help of the matwrap tool. No need to make specific programs and compile them to plot your data."

Can you elaborate a bit on this? How do you do that? I am considering to use octave in the future, but I don't have any clue of how to do such a thing. Help will be appreciated. Thanks.

asdf dijo...

See here.

 
Creative Commons License
Este weblog se publica bajo una licencia Creative Commons.