Up to version 4.6
The linestyle dash linestyle is specified by the linetype parameter, which also selects the line color, unless you explicitly set another with linecolor .
However, support for dashed lines depends on the selected terminal:
- Some terminals do not support dashed lines, for example
png (uses libgd ) - Other terminals, such as
pngcairo , support dashed lines, but are disabled by default. To enable it, use set termoption dashed or set terminal pngcairo dashed ... - Accurate line art differs between terminals. To see a specific
linetype , use the test command:
Launch
set terminal pngcairo dashed set output 'test.png' test set output
gives:

whereas the postscript terminal shows different dash patterns:
set terminal postscript eps color colortext set output 'test.eps' test set output

Version 5.0
Starting with version 5.0, the following changes are introduced regarding line types, dashes, and line colors:
A new dashtype parameter has been dashtype :
To get predefined dashes, use for example
plot x dashtype 2
You can also specify custom dash patterns, for example
plot x dashtype (3,5,10,5),\ 2*x dashtype '.-_'
Terminal parameters dashed and solid ignored. By default, all lines are solid. To change them to dashed lines, use, for example,
set for [i=1:8] linetype i dashtype i
The default line color set has been changed. You can choose between three different color sets with set colorsequence default|podo|classic :

Christoph Oct 17 '13 at 7:29 2013-10-17 07:29
source share