Xmgrace is a really nice and complete cross-platform program to generate 2D plots. As far as I know, it is easy to have it on linux and mac os x. For sure can be used under windows via cygwin.

In linux, you can install xmgrace via synaptic or other package manager, since is present in the repositories of all the major linux distribution.

Presenting xmgrace

From a terminal, fire up xmgrace typing… umh… xmgrace ;)
What you get is this window1:


We have a series of menu and some buttons, mainly for autoscale and zooming/moving options. If you have not save an actual xmgrace file, you need to import your data from the menu' data->import->ascii: select the file and the type (xy, nxy o block data; in the latter case, you will ask which column to import).


Once the data are imported, you can enhance the plot adding legends, titles, labels, grid, tic marks, colors etc. To bring up the windows with the different options, double click on an axis for the axis appearance, on the set of data for the set appearance, on the top of the plot for the graph appearance and legend box controls.

Where to start?

Easy: from the online documentation and forum

Google is also a nice place where to look for tutorials and other material. Here I will try something different adding video tutorials and tricks and tips.

Tricks and tips

Save your plot in portrait format

I was getting crazy to import in a word processor a plot made with xmgrace. The problem was that the plot was in landscape format, while was imported as portrait. That resulted, no matter what I was doing, in a truncated plot. Uncle google gives me a nice and complete idea. For me, was enough just use the utility convert from Imagemagick to rotate of 90° the plot saved by xmagrace (in eps in my case). The code is the following:

convert file.eps -rotate "+90>" file_portrait.eps
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License