dash/colour patterns for lines

dash/colour patterns for lines

Post by Steve Bick » Fri, 20 Jan 2006 03:17:11

Is there any way to separate the line 'type' (ie solid,dashed,dotted)
from the line colour? I'd like to make a plot (EPS format to be
imported into latex) which includes lines of different types and
colours. In the past, i've just created the plot and then edited the
postscript to get the dash patterns and colours that i wanted ... is
there any way to set these things from within a gnuplot script?
Specifically, i'd like two red lines (one solid and one dashed) and two
blue lines (also solid and dashed). I'm using gnuplot 4.0 with 'set
terminal postscript eps enhanced color'.

dash/colour patterns for lines

Post by merrit » Fri, 20 Jan 2006 03:44:41

In article <dqm0n7$mp0$ XXXX@XXXXX.COM >,

Yes, but you need version 4.1
See demo/example at


Ethan A Merritt


dash/colour patterns for lines

Post by Rufus T. F » Fri, 20 Jan 2006 03:56:25

no need to "separate" type and color - just use the commands

# set term post eps enh col
# set out "test.eps"
# test
# set out

to find out linetype and linecolor for your specific terminal. redirect
output to a file and open it with a viewer.

then plot with
# p 'file' w l lt <your_type> lc <your_color>