plot
Purpose
Provides the graphics interface.
Description
The subroutines described in "plot" produce output files
of the format outlined in this section. The tplot com-
mands interpret these graphics files for various devices,
performing the plotting instructions in the order that
they appear.
A graphics file consists of a stream of plotting
instructions. Each instruction consists of an ASCII
letter usually followed by bytes of binary information.
A point is designated by four bytes representing the x
and y values; each value is a two-byte signed integer.
The last designated point in an l, m, n, or p instruction
becomes the current point for the next instruction.
The following table lists each of the plot instructions
and the corresponding plot subroutines.
Instr Sub Description
a arc Draws the arc described by the following
12 bytes. The first four bytes describe
the center point (x, y) of the arc or
circle. The second four bytes describe
the beginning point of the arc. The
third four bytes describe the ending
point of the arc. Arcs are drawn
counterclockwise. The results are unpre-
dictable if the three points do not
really form an arc.
c circle Draws a circle whose center point is
defined by the first four bytes, and
whose radius is given as an integer in
the following two bytes.
e erase Starts another frame of output.
f linemod Uses the following string, terminated by
a new-line character, as the style for
drawing further lines. The styles are
dotted, solid, long-dashed, short-dashed,
and dot-dashed.
l line Draws a line from the point designated by
the next four bytes to the point desig-
nated by the following four bytes.
Instr Sub Description
m move The next four bytes designate a new
current point.
n cont Draws a line from the current point to
the point designated by the next four
bytes.
p point Plots the point designated by the next
four bytes.
s space The next four bytes designate the lower
left corner of the plotting area; fol-
lowed by four bytes for the upper right
corner. The plot is magnified or reduced
to fit the device as closely as possible.
t label Places the following ASCII string so that
its first character falls on the current
point. A new-line character terminates
the string.
The space setting
space(0, 0, 480, 432);
exactly fills the plotting area with unity scaling for the IBM Personal Com-
puter Graphics Printer. The upper limit is immediately outside the plotting
area, which is taken to be square. Points outside the plotting area can be
displayed on devices that do not have square displays.
Related Information
In this book: "plot" and "TERM."
The graph and tplot commands in AIX Operating System Commands Reference.