tags:

views:

145

answers:

1

Hi,

I understand this is going to be fairly subjective, but I am looking for example scripts to generate "professionally looking" graphs from gnuplot. I am plotting 3-5 price processes from a data file (all having same domain and same range of values), and I am looking for a set of tweaks to make the output look better, so that I can include it in a report or publication. Unfortunately I am rather disabled visually, so I am not able to define what I am really after - but the point is that the default plot generated by Mathematica looks kind of nice, and a default one from gnuplot resembles the 90-ties. I would be grateful for complete examples (preferably in vector format).

+1  A: 

I find that the epslatex terminal in gnuplot creates good results. It requires having a latex distribution around, but the results are really good. Try starting your file with something like

set terminal epslatex standalone header '\usepackage{color}'
set output 'image.tex'

After this you could use regular plotting commands - gnuplot will typeset everything using Computer Modern fonts, and save the resulting image into image.tex which you can compile into dvi and then convert to ps/pdf as you wish.

Shameless plug: I've written a shell script to automate the whole process for me. The script takes the Gnuplot script and outputs a png file, sampled from the ps at 300 dpi, which seems to be sufficient for academic journals. Of course, you could skip the conversion to png and just keep the ps/pdf image, but my images tended to have huge number of datapoints which made pdfs large (tens of MBs), making them unsuitable for submitting for publication.

Here's the link to the script: http://bitbucket.org/mbudisic/cl-goodies/src/tip/figlatex When I wrote it, I didn't know how to use grep properly, so I wrote my own regexp python script, which figlatex depends on, but you could replace that if you wished. http://bitbucket.org/mbudisic/cl-goodies/src/tip/regexp

Hope this helped.

mbudisic