Arrows may also be added to multiplot canvases using the arrow command, which has syntax:
arrow from x,y to x,y
The arrow command may be followed by the with keyword to specify to style of the arrow. The line type, line width and color of the arrow, may be specified using the same syntax as used in the plot command, using the linetype, linewidth and color modifiers after the word with, as in the example:
arrow from 0,0 to 10,10 \ with linetype 2 linewidth 5 color red
The style of the arrow may also be specified after the word with, and three options are available: head (the default), nohead, which produces line segments with no arrowheads on them, and twoway, which produces bidirectional arrows with heads on both ends.
The arrow command has a twin, the line command, which has the same syntax but with a different style setting of nohead.
A simple notice generated with the text and arrow commands.
In this example script, we use Pyxplot’s arrow and text commands to produce a simple notice advertising that a lecture has moved to a different seminar room: |
set multiplot ; set nodisplay |
w = unit(20*cm) # Width of notice |
# Put a rectangular box around notice |
# Write text of notice |
# Display notice |
![]() |