| Credits | Overview | Plotting Styles | Commands | Terminals |
|---|
This example shows how the 5-column form of "plot with marks" can be used to control the position, scale, and rotation of marks. Each barb is made up of several line segments. Some also contain a solid-fill triangular flag. Coordinates in the range [0:1] are provided in data blocks (see marks data). The plot command then applies a uniform scale and variable rotation.
The three windbarb marks shown here are extracted from the full set used by windbarbs.dem
#
# Windbarbs representing 5, 25, and 50 knot wind speed
# rotated and uniformly scaled by the 5-column form of the plot command
# plot with marks using x:y:scale:scale:angle units gxx
$MARK_5 <<EOM
0 0 1
0 1 1
0 0.870 1
0.235 0.956 1
EOM
$MARK_25 <<EOM
0 0 1
0 1 1
0 1 1
0.470 1.171 1
0 0.870 1
0.470 1.041 1
0 0.740 1
0.235 0.826 1
EOM
$MARK_50 <<EOM
0 0 1
0 1.100 1
0 0.900 3
0.470 1.071 3
0 1.100 3
0 0.900 3
EOM
set mark 5 $MARK_5 title " 5 knots" fill solid
set mark 25 $MARK_25 title "25 knots" fill solid
set mark 50 $MARK_50 title "50 knots" fill solid
unset border; unset tics
set key horizontal reverse Left samplen 1 height 3
set xrange [0:10]
set yrange [0:8]
SIZE = 0.05 # barb size will be 5% of graph width (units gxx)
plot [t=1:9:2] '+' using (t):(6):(SIZE):(SIZE):(36*t) notitle with marks mt 5 units gxx, \
[t=1:9:2] '+' using (t):(4):(SIZE):(SIZE):(15*t) notitle with marks mt 25 units gxx, \
[t=1:9:2] '+' using (t):(2):(SIZE):(SIZE):(25*t) notitle with marks mt 50 units gxx, \
keyentry with marks mt 5 ps 4 lc "black" title "5 knots", \
keyentry with marks mt 25 ps 4 lc "black" title "25 knots", \
keyentry with marks mt 50 ps 4 lc "black" title "50 knots"