Gnuplot will no longer make dashed lines after upgrading to Ubuntu 16

The title says it all mostly, I can no longer make dashed lines in the Postscript terminal in gnuplot. The script still works if I use gnuplot 4 instead of gnuplot 5. Code follows,

set terminal postscript eps enhanced color 'Times, 25'
set output "tauH_diff.eps"
set style line 1 lw 6 lc rgb 'blue'
set style line 2 lw 6 lc rgb 'red'
set style line 3 lw 6 lc rgb 'black'
set style line 4 lw 6 lc rgb 'forest-green'
set style line 5 lw 6 lc rgb 'orange'
set style line 6 lw 6 lc rgb 'black'
set autoscale y
set xrange[.01:10]
set logscale x
set xlabel "Z^{1/3}r"
set ylabel "4{/Symbol p}r^2Z^{-2}{/Symbol Dt}"
f(x)=0
plot 'tau_vs_r_H.dat' using ($1*1**(1.0/3.0)):(($6-$2)/1**(2.0)) with lines ls 4 title 'GEA 2',\
'tau_vs_r_H.dat' using ($1*1**(1.0/3.0)):(($5-$2)/1**(2.0)) with lines ls 3 title 'mGGA', \
'tau_vs_r_H.dat' using ($1*1**(1.0/3.0)):(($10-$2)/1**(2.0)) with lines ls 5 title 'loc4',\
'tau_vs_r_H.dat' using ($1*1**(1.0/3.0)):(($11-$2)/1**(2.0)) with lines ls 2 title 'loc4-NN',\
f(x) lc rgb 'black' notitle

Is this a gnuplot 5 problem or an ubuntu package problem? I have installed gnuplot5-qt and gnuplot5-X11 just to cover my bases. Are there any other packages or the like that may be missing? Thanks in advance for any help!

1 Answer

In 5th version gnuplot dash pattern is separate variable (dt) llike, e.g., linewidth (lw). I didn't find html version of (new) gnuplot documentation. But you can check pdf version (see page 37).

Bottom line is:

 solid line: plot f(x) dt 1 dashed v1 line: plot f(x) dt 2 dashed v2 line: plot f(x) dt 3

and so one ...

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like