The graph drawing routines may be freely mixed with those described in this section, allowing the user to control line color, width and styles. The attributes set up by these routines apply modally, i.e, all subsequent objects (lines, characters and symbols) plotted until the next change in attributes are affected in the same way. The only exception to this rule is that characters and symbols are not affected by a change in the line style, but are always drawn using a continuous line.
Line color is set using the routine plcol0
. The argument is ignored
for devices which can only plot in one color, although some terminals
support line erasure by plotting in color zero.
Line width is set using plwidth
. This option is not supported by
all devices.
Line style is set using the routine plstyl
or pllsty
. A
broken line is specified in terms of a repeated pattern consisting of
marks (pen down) and spaces (pen up). The arguments to this routine
are the number of elements in the vectors (dropped for the
redacted API) and integer mark
and
space
vectors which contain the mark and
space lengths in micrometers. Thus a line consisting of long and
short dashes of lengths 4 mm and 2 mm, separated by spaces
of length 1.5 mm is specified by mark
vector elements of 4000 and 2000, and space
vector elements of 1500 and 1500. To return to a continuous line,
just call plstyl
with vectors with no elements. You can also use
pllsty
to choose between 8 different predefined line styles.