I'm using gnuplot+epslatex to generate some plots.

This is what I put in the gnuplot code

set terminal epslatex color size xwidth cm,1.1*xwidth font 9 header 
dashlength 2.0 round standalone

set output "energy14two.tex"

and then I generate the .ps using this script

name=`grep "set *output" $1 | grep -v \# | awk '{print $3}' | cut -b 1 --complement | rev | cut -b 1 --complement | rev`
gnuplot $gnufilename && { latex -halt-on-error $texfilename.tex && dvips -q $texfilename.dvi && rm $texfilename.dvi; rm $texfilename-inc.eps $texfilename.aux $texfilename.log $texfilename.tex; } 

For the curve I used a dashed line style, and when I open the .ps file I find that the dashes length is quite irregular. Do you know what is the problem?

1 Answer 1


This is a problem with the postscript terminal (which is used by the epslatex terminal). It uses relative coordinates when drawing the plot lines. Since this may give rounding errors, a moveto is issued every 100 points. This interrupts the path, which becomes visible when using dash patterns.

The cairolatex eps terminal shouldn't have this problem (The pdfcairo terminal doesn't have this problem, so the cairolatex terminal should also work fine).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .