next up previous contents index
Next: plmesh: Set Default Mesh Up: Output Primitives Previous: Output Primitives   Contents   Index


plg: Plot a Graph

Calling Sequence
...

plg(y [, x][, <keylist>])

Description

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)].

Keyword Arguments

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.

Examples

The following example simply plots two straight lines.

>>> from gist import * 
>>> window (0, wait= 1, dpi= 75) 
0 
>>> plg([0,1]) 
>>> plg([1,0])

3#3

The following draws the graph of a sine curve:

fma() 
x = 10* pi* arange(200, typecode = Float)/ 199.0 
plg(sin(x), x)

4#4


next up previous contents index
Next: plmesh: Set Default Mesh Up: Output Primitives Previous: Output Primitives   Contents   Index
Michiel Jan Laurens de Hoon 2003-04-19