Blame demo/lines_arrows.dem

Packit 0986c0
#
Packit 0986c0
# Combine dot/dash, linecolor, and arrowstyle demos into a single file.
Packit 0986c0
# Demonstrate explicit choice of both dot/dash pattern (linetype) 
Packit 0986c0
# and color (linecolor).
Packit 0986c0
#
Packit 0986c0
set termoption dash
Packit 0986c0
Packit 0986c0
reset
Packit 0986c0
set xrange [-0.5:3.5]
Packit 0986c0
set yrange [-1:1.4]
Packit 0986c0
set bmargin 7
Packit 0986c0
unset ytics
Packit 0986c0
unset xtics
Packit 0986c0
#
Packit 0986c0
set title "Independent colors and dot/dash styles"
Packit 0986c0
unset colorbox
Packit 0986c0
#
Packit 0986c0
# reset linetypes to base dash patterns
Packit 0986c0
#
Packit 0986c0
set for [i=1:5] linetype i dt i
Packit 0986c0
Packit 0986c0
#
Packit 0986c0
# define line styles using explicit rgbcolor names
Packit 0986c0
#
Packit 0986c0
set style line 1 lt 2 lc rgb "red" lw 3
Packit 0986c0
set style line 2 lt 2 lc rgb "orange" lw 2
Packit 0986c0
set style line 3 lt 2 lc rgb "yellow" lw 3
Packit 0986c0
set style line 4 lt 2 lc rgb "green" lw 2
Packit 0986c0
Packit 0986c0
#
Packit 0986c0
set label 1 'set style line 1 lt 2 lc rgb "red" lw 3'    at -0.4, -0.25 tc rgb "red"
Packit 0986c0
set label 2 'set style line 2 lt 2 lc rgb "orange" lw 2' at -0.4, -0.35 tc rgb "orange"
Packit 0986c0
set label 3 'set style line 3 lt 2 lc rgb "yellow" lw 3' at -0.4, -0.45 tc rgb "yellow"
Packit 0986c0
set label 4 'set style line 4 lt 2 lc rgb "green" lw 2'  at -0.4, -0.55 tc rgb "green"
Packit 0986c0
set label 5 'plot ... lt 1 lc 3 ' at -0.4, -0.65 tc lt 3
Packit 0986c0
set label 6 'plot ... lt 3 lc 3 ' at -0.4, -0.75 tc lt 3
Packit 0986c0
set label 7 'plot ... lt 5 lc 3 ' at -0.4, -0.85 tc lt 3
Packit 0986c0
#
Packit 0986c0
set xlabel "You will only see dashed lines if your current terminal setting permits it"
Packit 0986c0
#
Packit 0986c0
show style line
Packit 0986c0
#
Packit 0986c0
# draw some plots
Packit 0986c0
#
Packit 0986c0
plot cos(x)     ls 1 title 'ls 1',   \
Packit 0986c0
     cos(x-.2)  ls 2 title 'ls 2',\
Packit 0986c0
     cos(x-.4)  ls 3 title 'ls 3',\
Packit 0986c0
     cos(x-.6)  ls 4 title 'ls 4', \
Packit 0986c0
     cos(x-.8)  lt 1 lc 3 title 'lt 1 lc 3',  \
Packit 0986c0
     cos(x-1.)  lt 3 lc 3 title 'lt 3 lc 3',  \
Packit 0986c0
     cos(x-1.2) lt 5 lc 3 title 'lt 5 lc 3'
Packit 0986c0
Packit 0986c0
#
Packit 0986c0
pause -1 "Hit return to continue"
Packit 0986c0
Packit 0986c0
unset for [i=1:8] label i
Packit 0986c0
set title "The pointinterval property is another way to create interrupted lines"
Packit 0986c0
set xlabel "This technique works best for equally spaced data points"
Packit 0986c0
set bmargin 6
Packit 0986c0
set offset .05, .05
Packit 0986c0
set xrange [-0.5:3.3]
Packit 0986c0
set style func linespoints
Packit 0986c0
Packit 0986c0
plot cos(x)     lt -1 pi -4 pt 6 title 'pi -4',   \
Packit 0986c0
     cos(x-.8)  lt -1 pi -3 pt 7 ps 0.2 title 'pi -3 pt 7 ps 0.2',  \
Packit 0986c0
     cos(x-.2)  lt -1 pi -6 pt 7 title 'pi -6',\
Packit 0986c0
     cos(x-.4)  lt -1 pi -3 pt 4 title 'pi -3',\
Packit 0986c0
     cos(x-.6)  lt -1 pi -5 pt 5 title 'pi -5', \
Packit 0986c0
     cos(x-1.)  with line lt -1 notitle,  \
Packit 0986c0
     cos(x+.2)  with line lt -1 lw 2 title 'lw 2'
Packit 0986c0
Packit 0986c0
#
Packit 0986c0
pause -1 "Hit return to continue"
Packit 0986c0
Packit 0986c0
set title "The pointinterval property also works with character point symbols"
Packit 0986c0
set style data linespoints
Packit 0986c0
set pointintervalbox 1.5
Packit 0986c0
unset xlabel
Packit 0986c0
myencoding = GPVAL_ENCODING
Packit 0986c0
set encoding utf8
Packit 0986c0
Packit 0986c0
plot '+' using 1:(cos(x-1.))  with line lt -1 lw 1 title 'lw 1',  \
Packit 0986c0
     '+' using 1:(cos(x))     lt -1 pi -4 pt "C" title 'pi -4',   \
Packit 0986c0
     '+' using 1:(cos(x-.8))  lt -1 pi -3 pt "D" title 'pi -3 pt "D"',  \
Packit 0986c0
     '+' using 1:(cos(x-.2))  lt -1 pi -6 pt "✠" tc rgb "blue" title 'pi -6 tc rgb "blue"',\
Packit 0986c0
     '+' using 1:(cos(x-.4))  lt -1 pi -3 pt "✲" title 'pi -3',\
Packit 0986c0
     '+' using 1:(cos(x-.6))  lt -1 pi -5 pt "☺" title 'pi -5', \
Packit 0986c0
     '+' using 1:(cos(x+.2))  with line lt -1 lw 2 title 'lw 2'
Packit 0986c0
Packit 0986c0
pause -1 "Hit return to continue"
Packit 0986c0
Packit 0986c0
set encoding myencoding
Packit 0986c0
reset
Packit 0986c0
Packit 0986c0
set xrange [-1000:1000]
Packit 0986c0
set yrange [-178:86]
Packit 0986c0
set tics scale 0
Packit 0986c0
Packit 0986c0
set style line 1 lt 1 lw 2
Packit 0986c0
set style line 2 lt 1 lc rgb "skyblue" lw 2
Packit 0986c0
Packit 0986c0
set style arrow 1 head filled size screen 0.025,30,45 ls 1
Packit 0986c0
set style arrow 2 head nofilled size screen 0.03,15 ls 2
Packit 0986c0
set style arrow 3 head filled size screen 0.03,15,45 ls 1
Packit 0986c0
set style arrow 4 head filled size screen 0.03,15 ls 2
Packit 0986c0
set style arrow 5 heads filled size screen 0.03,15,135 ls 1
Packit 0986c0
set style arrow 6 head empty size screen 0.03,15,135 ls 2
Packit 0986c0
set style arrow 7 nohead ls 1
Packit 0986c0
set style arrow 8 heads size screen 0.008,90 ls 2
Packit 0986c0
Packit 0986c0
print ' We have defined the following arrowstyles:'
Packit 0986c0
show style arrow
Packit 0986c0
Packit 0986c0
set arrow from -500,-100 rto 1000, 0  as 1
Packit 0986c0
set arrow from -500,-110 rto 1000, 0  as 2
Packit 0986c0
set arrow from -500,-120 rto 1000, 0  as 3
Packit 0986c0
set arrow from -500,-130 rto 1000, 0  as 4
Packit 0986c0
set arrow from -500,-140 rto 1000, 0  as 5
Packit 0986c0
set arrow from -500,-150 rto 1000, 0  as 6
Packit 0986c0
set arrow from -500,-160 rto 1000, 0  as 7
Packit 0986c0
set arrow from -500,-170 rto 1000, 0  as 8
Packit 0986c0
Packit 0986c0
set label 'arrowstyle 1:' at -520,-100 right
Packit 0986c0
set label 'arrowstyle 2:' at -520,-110 right
Packit 0986c0
set label 'arrowstyle 3:' at -520,-120 right
Packit 0986c0
set label 'arrowstyle 4:' at -520,-130 right
Packit 0986c0
set label 'arrowstyle 5:' at -520,-140 right
Packit 0986c0
set label 'arrowstyle 6:' at -520,-150 right
Packit 0986c0
set label 'arrowstyle 7:' at -520,-160 right
Packit 0986c0
set label 'arrowstyle 8:' at -520,-170 right
Packit 0986c0
Packit 0986c0
set title 'Top: plot with vectors arrowstyle 1, Bottom: explicit arrows'
Packit 0986c0
plot 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 3
Packit 0986c0
pause -1 "Hit return to continue"
Packit 0986c0
reset