# Gnuplot+epslatex irregular dashed line

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
\fontsize{10}{13.2}
\usepackage[lite,subscriptcorrection,slantedGreek,nofontinfo]{mtpro2}
\usepackage{amsmath}
\renewcommand{\rmdefault}{ptm}'
dashlength 2.0 round standalone

set output "energy14two.tex"
``````

and then I generate the .ps using this script

``````#!/bin/bash
gnufilename=\$1
name=`grep "set *output" \$1 | grep -v \# | awk '{print \$3}' | cut -b 1 --complement | rev | cut -b 1 --complement | rev`
texfilename=\${name%.*}
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?

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).