plg(y [, x][, <keylist>])
Plot a graph of y versus x. y and x must be 1D arrays of equal length. If x is omitted, it defaults to [1, 2, ..., len(y)].
The following keyword argument(s) apply only to this function.
rspace = <float value> rphase = <float value> arroww = <float value> arrowl = <float value>
Select the spacing, phase, and size of occasional ray arrows placed along polylines. The spacing and phase are in NDC units (0. 0013 NDC equals 1.0 point); the default rspace is 0.13, and the default rphase is 0.11375, but rphase is automatically incremented for successive curves on a single plot. The arrowhead width, arroww, and arrowhead length, arrowl are in relative units, defaulting to 1.0, which translates to an arrowhead 10 points long and 4 points in half-width.
The following additional keyword arguments can be specified with this function. legend, hide, type, width, color, closed, smooth, marks, marker, mspace, mphase, rays
See ``Plot Function Keywords'' on page
for detailed descriptions of these keywords.
The following example simply plots two straight lines.
>>> from gist import * >>> window (0, wait= 1, dpi= 75) 0 >>> plg([0,1]) >>> plg([1,0])
The following draws the graph of a sine curve:
fma() x = 10* pi* arange(200, typecode = Float)/ 199.0 plg(sin(x), x)