Create scientific plots using gnuplot

February 28th, 2011 | No Comments

There is a little update to the epslatex terminal introduction page.

The tics labels can automatically use the math mode from LaTeX by setting the right format option:

set format '$%g$'

Another change is to omit the \resizebox command in LaTeX to include the figure. The problem is that this command also scales your fonts, which you probably don’t want. The alternative is to specify the correct size of your plot before hand and then including the file only with:


July 27th, 2010 | 1 Comment

In the introduction I have set the xtics labels manually to use a multiple of π:

set xtics ('-2π' -2*pi, '-π' -pi, 0, 'π' pi, '2π' 2*pi)

But there is an easier way to achieve the same. First we tell Gnuplot to place the tics at multiplies of π. And then the trick: with the set format option we can tell Gnuplot to use multiple of π too:

set xtics pi
set format x '%.0Pπ'

In the same way we can place tics without any label by applying:

set format x ''