Back to demo index

gnuplot demo script: dashtypes.dem

autogenerated by webify.pl on Wed Aug 21 21:18:17 2024
gnuplot version gnuplot 6.1 last modified 2024-08-21
#
# Exercise various dashtype options
# (Version 5 only)
#
set border 0
unset xtics
unset ytics
unset key
set yrange [0:1]

y = 0.9
set label 101 at screen 0.1, screen y "Terminal's native dashtypes"
do for [i=1:10] {
    y = y - 0.05
    set arrow i from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 2 dt i
    set label i "dt ".i at screen 0.15, screen y
}
y = y - 0.05
set label 102 at screen 0.1, screen y "Custom dashtypes"
y = y - 0.05
    new = "."
    set label at screen 0.15, screen y 'dt "'.new.'"'
    set arrow 11 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new
y = y - 0.05
    new = "-"
    set label at screen 0.15, screen y 'dt "'.new.'"'
    set arrow 12 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new
y = y - 0.05
    new = "._"
    set label at screen 0.15, screen y 'dt "'.new.'"' noenh
    set arrow 13 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new
y = y - 0.05
    new = "..- "
    set label at screen 0.15, screen y 'dt "'.new.'"'
    set arrow 14 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new
y = y - 0.05
    set arrow 15 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lc "blue'
    set arrow 15 dt (50,6,2,6)
    set label at screen 0.10, screen y 'dt (50,6,2,6)'


plot 0 with lines lt nodraw


Click here for minimal script to generate this plot




# Now test effect of linewidth
unset arrow 15
unset label 15

set for [i=1:14] arrow i lw 1+(i-1)%5

plot 0 with lines lt nodraw


Click here for minimal script to generate this plot