# good (free) software for producing publishable images?

I am producing 1d and 2d images using Matlab right now for comparison of accuracy against a given model. I need to compare my methods with the standard Gaussian .wfn model and I am going to do that by analyzing the density of a molecule as well as the laplacian.

I am interested in producing 2-D images of differences in my approximation to the .wfn approximation (possibly via contour map?) and am also interested in properties (density, laplacian, etc) along the bond path and direct line between two atoms.

As I previously stated, I am currently using Matlab to produce my images, though these images are mostly for me and my associates. They do not seem to be the types of images I often see in papers and other publications.

What kind of software should I be using (or do others use) to produce publication-quality graphs and images?

• In scholarly publications coherence of style is usually important: e.g. the lettering of the graphs should be in the same font and format as in the main text. To obtain more focused answers you should also specify which document preparation system ($\TeX$, $\LaTeX$, a generic word processing system) are you going to use. – Stefano M Aug 14 '12 at 8:13

I personally have come the way from Gnuplot to Matplotlib with PGFPlots as an intermediate step.

I will try to name all aspects of Matplotlib that I like.

• It is very versatile. You are not limited to line or scatter plots, you can easily do bar plots, images (matrix visualization!), basic 3D plotting and even some animation.

• You can use Matplotlib as a GUI for your Python applications.

• LaTeX is supported.
• It supports many output formats (try to get pain-free PDF with Gnuplot).
• Matplotlib's user base is broad. You get reasonably much help on the internet.
• It reasonably easy to learn.
• Being a Python library, you have the power of Python at hand (which means for example that you can easily load text or HDF5 data or, using wrappers such as Cython/f2py, load binary data written by compiled programs written in C/Fortan).

However, I have always loved figures that integrate seamlessly into LaTeX documents. Here, in principle, PGFPlots excels. However, it is slow and (compared to Matplotlib) limited.

That's why I have come to prefer a new solution: the (experimental) PGF backend for Matplotlib. Using this, the plots themselves are created by Matplotlib, whereas the axis and labels are set up by PGFPlots and finally drawn by LaTeX. You can use this for either PDF output without an embedding LaTeX document or for PGF output you can include in your LaTeX document.

I have the feeling that the solution I described above is the solution for my use cases (for the time being).

I oftem use Matlab and then save the result as an eps file via print -depsc2 -f1 fig. This saves figure 1 as an eps file named fig.eps. There is also the Plot2Svg from matlab file exchange that can save as svg. This is really nice since you can then open the files in Inkscape or other vector graphics software and edit them.

If you are willing to learn new tools, there is also matplotlib which is basically a python package. I have not used it personally, but many friends of mine do use it and tend to produce really nice graphs. You can check their gallery.

Finally, if you are willing to pay for the software, you could use TecPlot but that'll cost you an arm and a leg!

• Before using TecPlot, use Visit or ParaView. They're just as powerful and are free. They can also produce very high quality visualizations. – Wolfgang Bangerth Aug 14 '12 at 6:46
• @Wolfgang - In my experience, TecPlot is better. It allows you to save vector format (Paraview doesn't), and it produces much nicer vector plots. – akid Aug 14 '12 at 7:29
• @akid: I must admit that I don't know ParaView very well. I use Visit which produces very nice vector plots. I don't know about vector formats, though. It can save plots in high resolution, though. – Wolfgang Bangerth Aug 14 '12 at 8:00

If you're willing to overcome the learning curve of Gnuplot, you can generate top-quality figures with it (as exemplified in http://www.gnuplotting.org/). In particular, I'd recommend using the epslatex terminal as it allows you to use LaTeX to render all the text in the figure (including any mathematical notation that you may wish to input).

If you want to stick to MATLAB, you may want to try matlab2tikz. This is a script that converts MATLAB figures to Tikz illustrations.

Other options:

I use save2pdf.m http://www.mathworks.com/matlabcentral/fileexchange/16179-save2pdf

Also, if a vector image is not needed, try myaa.m http://www.mathworks.com/matlabcentral/fileexchange/20979-myaa-my-anti-alias-for-matlab