Home
Manual
Packages
Global Index
Keywords
Quick Reference
|
all functions - p
palette
|
palette, filename
or palette, source_window_number
or palette, red, green, blue, ntsc=1/0
or palette, red, green, blue, gray
or palette, red, green, blue, query=1
or palette, red, green, blue, gray, query=1
sets (or retrieves with query=1) the palette for the current
graphics window. The FILENAME is the name of a Gist palette file;
the standard palettes are "earth.gp", "stern.gp", "rainbow.gp",
"heat.gp", "gray.gp", and "yarg.gp". Use the maxcolors keyword
in the pldefault command to put an upper limit on the number of
colors which will be read from the palette in FILENAME.
In the second form, the palette for the current window is copied
from the SOURCE_WINDOW_NUMBER. If the X colormap for the window is
private, there will still be two separate X colormaps for the two
windows, but they will have the same color values.
In the third form, RED, GREEN, and BLUE are 1-D arrays of the same
length specifying the palette you wish to install; the values
should vary between 0 and 255, and your palette should have no
more than 240 colors. If ntsc=0, monochrome devices (such as most
laser printers) will use the average brightness to translate your
colors into gray; otherwise, the NTSC (television) averaging will
be used (.30*RED+.59*GREEN+.11*BLUE). Alternatively, you can specify
GRAY explicitly.
Ordinarily, the palette is not dumped to a hardcopy file
(color hardcopy is still rare and expensive), but you can
force the palette to dump using the window or hcp_file commands.
See the dump= keyword for the hcp_file and window commands if you
are having trouble getting color in your hardcopy files.
builtin function, documented at i0/graph.i line 284
|
SEE ALSO:
|
window,
fma,
hcp,
pldefault,
plg
|
parsedate
|
parsedate -- get numerical version of a timestamp
SYNOPSIS: parsedate, timestamp, day,month,year, hour,minute,second;
parsedate(timestamp)
HISTORY: October 30, 1995 by Eric THIEBAUT.
interpreted function, defined at i/string.i line 51
|
SEE ALSO:
|
gettime,
getdate,
timestamp
|
pause
|
pause, milliseconds
or pause(milliseconds)
pause for the specified number of milliseconds of wall clock
time, or until input arrives from the keyboard.
If you call pause as a function, the return value is 1
if the specified number of milliseconds elapsed, or 0 if
keyboard input caused the pause to abort.
This is intended for use in creating animated sequences.
builtin function, documented at i0/graph.i line 1365
|
pc_primitives
|
pc_primitives, file
sets FILE primitive data types to be native to IBM PC.
interpreted function, defined at i0/std.i line 2168
|
pcen_source
|
pcen_source, opac, source, mesh, drat_nomilne
point centers the SOURCE array (in place) using a complicated
algorithm involving the OPAC and MESH (from form_mesh and update_mesh).
If non-nil, DRAT_NOMILNE must have the same format as the
drat_nomilne option.
interpreted function, defined at i0/drat.i line 1201
|
peak
|
peak
interpreted function, defined at i/test1.i line 378
|
pic3_rays
|
rays= pic3_rays(xpict, ypict, ray)
or rays= pic3_rays(xpict, ypict, ray, q_up)
Like picture_rays, but returns rays in the [p,q] representation
appropriate for hex5_track.
(XPICT,YPICT) are 2D arrays of pixel corners in the image plane;
RAY is the central ray (0,0) in (XPICT,YPICT) coordinates, given
in [p,q] representation (i.e. RAY is a 3-by-2 array). The
optional Q_UP is a 3-vector specifying the orientation of the
y-axis in the picture plane (see theta_up, phi_up in picture_rays
for a description of default orientation). Q_UP must not be
parallel to RAY(,2).
interpreted function, defined at i0/hex.i line 94
|
SEE ALSO:
|
hex5_track,
conv3_rays,
picture_rays
|
picture_rays
|
picture_rays(xpict, ypict, ray)
or picture_rays(xpict, ypict, ray, theta_up, phi_up)
returns 2-D array of rays, one at the center of each zone (which
represents a pixel here) of the mesh (XPICT, YPICT). The rays are
all parallel to the given RAY (a 3, 5, or 6 element vector). The
(XPICT, YPICT) coordinates are in the plane perpendicular to the rays,
with the origin XPICT=YPICT=0 at the given RAY.
If (THETA_UP, PHI_UP) are given, the +YPICT-axis will lie along the
projection of the (THETA_UP, PHI_UP) direction into the (XPICT, YPICT)
plane. The default (THETA_UP, PHI_UP) is (pi/2, pi/2) -- the +y-axis
-- unless (THETA, PHI) is the y-axis, in which case it is (pi/2, 0)
-- the +x-axis. This matches the DIRT/TDG ray coordinate convention
in the sense that if RAY is [0,0,theta], then
(zncen(XPICT),zncen(YPICT)) are the DIRT/TDG (x,y) coordinates for
the rays.
If XPICT and YPICT are imax-by-jmax, the returned array will have
dimensions 5-by-(imax-1)-by-(jmax-1). That is, "best" coordinates
are returned. The (x,y,z) of all of the returned rays will lie in
the plane perpendicular to the ray passing through the given central
RAY.
interpreted function, defined at i/rays.i line 265
|
SEE ALSO:
|
form_rays,
best_rays,
dirt_rays,
internal_rays,
area
|
pix_window
|
pix_window, dpi
or pix_window, dpi, n
create a new window for the pixels command with the given DPI
(dots per inch). If N is specified, the new window will be
number N (0-7). Also sets the pix_dpi variable appropriately.
pix_window, 75 // makes a small window
pix_window, 100 // makes a large window
interpreted function, defined at i/pixels.i line 10
|
SEE ALSO:
|
pix_dpi,
pixels,
window
|
pixels
|
pixels, z
or pixels, z, dx0, dy0
plots the image Z as a cell array -- an array of equal rectangular
cells colored according to the 2-D array Z. The first dimension
of Z is plotted along x, the second dimension is along y.
If Z is of type char, it is used "as is", otherwise it is linearly
scaled to fill the current palette, as with the bytscl function.
(See the bytscl function for explanation of top, cmin, cmax.)
The image is placed in "coordinate system zero"; that is, outside
Yorick's ordinary coordinate system, so zooming and coordinate
system changes will not effect it. Unlike pli, Yorick attempts
to make each X pixel correspond to one cell of the Z array.
In order to do this, the pix_dpi variable must be set to the
dots-per-inch (either 75 or 100) of the X window in which the
result of pixels will be displayed (see the dpi keyword of the
window command).
The default position of the upper left hand corner of the picture
is specified by the pix_origin variable. If DX0 and/or DY0 are
present, they adjust this origin for this image. The units of
DX0 and DY0 are in pixels; DY0 is positive downwards. (However,
the 2nd index of the image increases upwards.) Resizing the X
window will probably necessitate changing pix_origin.
The following keywords are legal (each has a separate help entry):
KEYWORDS: top, cmin, cmax
interpreted function, defined at i/pixels.i line 29
|
SEE ALSO:
|
pix_window,
window,
palette,
bytscl,
histeq_scale,
pix_dpi,
pix_origin
|
pl3d
|
pl3d
interpreted function, defined at i/demo2.i line 188
|
pl3surf
|
pl3surf, nverts, xyzverts
or pl3surf, nverts, xyzverts, values
Perform simple 3D rendering of an object created by slice3
(possibly followed by slice2). NVERTS and XYZVERTS are polygon
lists as returned by slice3, so XYZVERTS is 3-by-sum(NVERTS),
where NVERTS is a list of the number of vertices in each polygon.
If present, the VALUES should have the same length as NVERTS;
they are used to color the polygon. If VALUES is not specified,
the 3D lighting calculation set up using the light3 function
will be carried out. Keywords cmin= and cmax= as for plf, pli,
or plfp are also accepted. (If you do not supply VALUES, you
probably want to use the ambient= keyword to light3 instead of
cmin= here, but cmax= may still be useful.)
interpreted function, defined at i/slice3.i line 1082
|
SEE ALSO:
|
pl3tree,
slice3,
slice2,
rot3,
light3
|
pl3tree
|
pl3tree, nverts, xyzverts
or pl3tree, nverts, xyzverts, values, plane
Add the polygon list specified by NVERTS (number of vertices in
each polygon) and XYZVERTS (3-by-sum(NVERTS) vertex coordinates)
to the currently displayed b-tree. If VALUES is specified, it
must have the same dimension as NVERTS, and represents the color
of each polygon. If VALUES is not specified, the polygons
are assumed to form an isosurface which will be shaded by the
current 3D lighting model; the isosurfaces are at the leaves of
the b-tree, sliced by all of the planes. If PLANE is specified,
the XYZVERTS must all lie in that plane, and that plane becomes
a new slicing plane in the b-tree.
Each leaf of the b-tree consists of a set of sliced isosurfaces.
A node of the b-tree consists of some polygons in one of the
planes, a b-tree or leaf entirely on one side of that plane, and
a b-tree or leaf on the other side. The first plane you add
becomes the root node, slicing any existing leaf in half. When
you add an isosurface, it propagates down the tree, getting
sliced at each node, until its pieces reach the existing leaves,
to which they are added. When you add a plane, it also propagates
down the tree, getting sliced at each node, until its pieces
reach the leaves, which it slices, becoming the nodes closest to
the leaves.
This structure is relatively easy to plot, since from any
viewpoint, a node can always be plotted in the order from one
side, then the plane, then the other side.
This routine assumes a "split palette"; the colors for the
VALUES will be scaled to fit from color 0 to color 99, while
the colors from the shading calculation will be scaled to fit
from color 100 to color 199. (If VALUES is specified as a char
array, however, it will be used without scaling.)
You may specifiy a cmin= or cmax= keyword to affect the
scaling; cmin is ignored if VALUES is not specified (use the
ambient= keyword from light3 for that case).
interpreted function, defined at i/slice3.i line 1145
|
SEE ALSO:
|
pl3surf,
slice3,
slice2,
rot3,
light3,
split_palette
|
plane3
|
plane3(normal, point)
or plane3([nx,ny,nz], [px,py,pz])
returns [nx,ny,nz,pp] for the specified plane.
interpreted function, defined at i/slice3.i line 49
|
SEE ALSO:
|
slice3,
mesh3
|
plc
|
plc, z, y, x, levs=z_values
or plc, z, y, x, ireg, levs=z_values
or plc, z, levs=z_values
plots a contours of Z on the mesh Y versus X. Y, X, and IREG are
as for plm. The Z array must have the same shape as Y and X.
The function being contoured takes the value Z at each point
(X,Y) -- that is, the Z array is presumed to be point-centered.
The Y, X, and IREG arguments may all be omitted to default to the
mesh set by the most recent plmesh call.
The LEVS keyword is a list of the values of Z at which you want
contour curves. The default is eight contours spanning the
range of Z.
See plfc if you want to color the regions between contours.
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
type, width, color, smooth
marks, marker, mspace, mphase
smooth, triangle, region
builtin function, documented at i0/graph.i line 426
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
plmesh,
plfc,
contour,
spann,
limits,
logxy,
range,
fma,
hcp
|
plc_label
|
plc_label, z,y,x, levs, ndivs=ndivs, opaque=opaque, lmgrid=lmgrid
call after plc,z,y,x in order to put labels on an existing contour
plot. If you are going to set the limits (by means of the limits
or range functions, or zooming or panning with the mouse), do so
before calling plc_label, since it reads the current plot limits.
finds points where numeric contours labels can be drawn
input
z : array to be contoured
y: y coords of array to be contoured
x: x coords of array to be contoured
levs: contour levels to be labelled
ndivs: divide domain into ndvis x ndivs subregions with label in each
opaque: if defined, white out below label
lmgrid: if defined, draw the subregion perimeters
output --- none now
authors: Phil Rasch and David Munro
last revised: 20 July, 1996 (for 1.3 distribution)
interpreted function, defined at i/plclab.i line 10
|
SEE ALSO:
|
plc
|
pldefault
|
pldefault, key1=value1, key2=value2, ...
sets default values for the various properties of graphical elements.
The keywords can be most of the keywords that can be passed to the
plotting commands:
plg: color, type, width,
marks, mcolor, msize, mspace, mphase,
rays, rspace, rphase, arrowl, arroww
pldj: color, type, width
plt: color, font, height, path, justify, opaque
plm: color, type, width
plv: color, hollow, width, aspect
plc: color, type, width,
marks, mcolor, marker, msize, mspace, mphase
plf: edges, ecolor, ewidth
The initial default values are:
color="fg", type="solid", width=1.0 (1/2 point),
marks=1, mcolor="fg", msize=1.0 (10 points),
mspace=0.16, mphase=0.14,
rays=0, arrowl=1.0 (10 points), arroww=1.0 (4 points),
rspace=0.13, rphase=0.11375,
font="helvetica", height=12.0, justify="NN", opaque=0,
hollow= 0, aspect=0.125,
edges=0, ecolor="fg", ewidth=1.0 (1/2 point)
Additional default keywords are:
dpi, style, legends (see window command)
palette (to set default filename as in palette command)
maxcolors (default 200)
builtin function, documented at i0/graph.i line 1238
|
SEE ALSO:
|
window,
plsys,
plq,
pledit,
plg
|
pldj
|
pldj, x0, y0, x1, y1
plots disjoint lines from (X0,Y0) to (X1,Y1). X0, Y0, X1, and Y1
may have any dimensionality, but all must have the same number of
elements.
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
type, width, color
builtin function, documented at i0/graph.i line 603
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
limits,
logxy,
range,
fma,
hcp
|
pleb
|
pleb, y, x, dx=dx, dy=dy
plots Y vs. X with error bars.
Uncertainty on X and/or Y are specified with the dx= and dy= keywords.
X and Y must have same dimensions, dx= and dy= must be conformable
with X (or Y). Either dx or dy may be nil for no error bar in that
direction. Scalar dx or dy gives equal error bars at all points,
dimsof(dx)==dimsof(X), etc., gives different error bar at each point.
dx= and dy= may also have a trailing dimension of length 2 in order
to get asymmetric error bars; dx(..,1) is the lower error bar length,
and dx(..,2) is the upper error bar length in that case, etc.
If marker=, msize=, or width= is specified, markers are positioned
at X, Y using plmk. Use the mfill=1 keyword to get filled markers
(width>=10. in plmk; width= refers to error bar width in pleb).
EXAMPLE:
x = [0, 1, 2, 3];
y = [0, 2, 4, 7];
pleb, y, x, dx=0.2, dy=[0.3, 0.4, 0.5, 0.3], mfill=1;
Uncertainties on dx are the same for all X, and those
on Y are different for each value of Y. Filled markers
will be displayed at (X, Y).
KEYWORDS: color, width, marker, msize
dx uncertainty on X
dy uncertainty on Y
interpreted function, defined at i0/graph.i line 1790
|
SEE ALSO:
|
plmk,
pldj
|
pledit
|
pledit, key1=value1, key2=value2, ...
or pledit, n_element, key1=value1, key2=value2, ...
or pledit, n_element, n_contour, key1=value1, key2=value2, ...
changes some property of element number N_ELEMENT (and contour
number N_CONTOUR of that element). If N_ELEMENT and N_CONTOUR are
omitted, the default is the most recently added element, or the
element specified in the most recent plq query command.
The keywords can be any of the keywords that apply to the current
element. These are:
plg: color, type, width,
marks, mcolor, marker, msize, mspace, mphase,
rays, rspace, rphase, arrowl, arroww,
closed, smooth
pldj: color, type, width
plt: color, font, height, path, justify, opaque
plm: region, boundary, inhibit, color, type, width
plf: region
plv: region, color, hollow, width, aspect, scale
plc: region, color, type, width,
marks, mcolor, marker, msize, mspace, mphase
smooth, levs
(For contours, if you aren't talking about a particular N_CONTOUR,
any changes will affect ALL the contours.)
A plv (vector field) element can also take the scalem
keyword to multiply all vector lengths by a specified factor.
A plt (text) element can also take the dx and/or dy
keywords to adjust the text position by (dx,dy).
builtin function, documented at i0/graph.i line 1203
|
SEE ALSO:
|
window,
plsys,
plq,
pldefault,
plg
|
plf
|
plf, z, y, x
or plf, z, y, x, ireg
or plf, z
plots a filled mesh Y versus X. Y, X, and IREG are as for plm.
The Z array must have the same shape as Y and X, or one smaller
in both dimensions. If Z is of type char, it is used "as is",
otherwise it is linearly scaled to fill the current palette, as
with the bytscl function.
(See the bytscl function for explanation of top, cmin, cmax.)
The mesh is drawn with each zone in the color derived from the Z
function and the current palette; thus Z is interpreted as a
zone-centered array.
As for pli and plfp, Z may also be a 3x(NX-1)x(NY-1) array
of char giving the [r,g,b] components of each color. See the
color keyword for cautions about using this if you do not have
a true color display.
The Y, X, and IREG arguments may all be omitted to default to the
mesh set by the most recent plmesh call.
A solid edge can optionally be drawn around each zone by setting
the EDGES keyword non-zero. ECOLOR and EWIDTH determine the edge
color and width. The mesh is drawn zone by zone in order from
IREG(2+imax) to IREG(jmax*imax) (the latter is IREG(imax,jmax)),
so you can achieve 3D effects by arranging for this order to
coincide with back-to-front order. If Z is nil, the mesh zones
are filled with the background color, which you can use to
produce 3D wire frames.
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
region, top, cmin, cmax, edges, ecolor, ewidth
builtin function, documented at i0/graph.i line 510
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
plmesh,
limits,
logxy,
range,
fma,
hcp,
palette,
bytscl,
histeq_scale
|
plfc
|
plfc, z, y, x, levs=z_values
or plfc, z, y, x, ireg, levs=z_values
fills contours of Z on the mesh Y versus X. Y, X, and IREG are
as for plm. The Z array must have the same shape as Y and X.
The function being contoured takes the value Z at each point
(X,Y) -- that is, the Z array is presumed to be point-centered.
The LEVS keyword is a list of the values of Z at which you want
contour curves. These curves divide the mesh into numberof(LEVS)+1
regions, each of which is filled with a solid color. If LEVS is
nil, up to 19 "nice" equally spaced level values spanning the
range of Z are selected. The level values actually used are
always output to the external variable plfc_levs.
If you specify levs=, you may also specify colors= a list of
colors of length numberof(LEVS)+1. The colors should be indices
into the current palette. If you do not specify them, equally
spaced colors are chosen.
The following keywords are legal (each has a separate help entry):
KEYWORDS: triangle, region
interpreted function, defined at i0/graph.i line 1582
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
plmesh,
color_bar,
spann,
contour,
limits,
logxy,
range,
fma,
hcp
|
plfp
|
plfp, z, y, x, n
plots a list of filled polygons Y versus X, with colors Z.
The N array is a 1D list of lengths (number of corners) of the
polygons; the 1D colors array Z has the same length as N. The
X and Y arrays have length sum(N).
If Z is of type char, it is used "as is", otherwise it is linearly
scaled to fill the current palette, as with the bytscl function.
If Z is nil, the background color is used for every polygon.
(See the bytscl function for explanation of top, cmin, cmax.)
As for plf and pli, Z may also be a 3-by-numberof(N) array of
char giving the [r,g,b] components of each color. See the
color keyword for cautions about using this if you do not have
a true color display.
As a special case, if n(2:)==1, the first polygon is assumed
to have NDC coordinates, while the remaining individual X and Y
values are in world coordinates. The first polygon is drawn
numberof(n)-1 times, with its (0,0) placed at each of the
individual (X,Y) values in succession. This is a hack to enable
plotting of more elaborate data markers than plg,type=0 -- see
the plmk function for details.
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide, top, cmin, cmax, edges, ecolor, ewidth
builtin function, documented at i0/graph.i line 546
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfc,
limits,
logxy,
range,
fma,
hcp
|
plg
|
plg, y, x
or plg, y
plots a graph of Y versus X. Y and X must be 1-D arrays of equal
length; if X is omitted, it defaults to [1, 2, ..., numberof(Y)].
A keyword n=[n1,n2,n3,...nN] can be used to add N curves. In this
case, sum(n) must be numberof(y).
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
type, width, color, closed, smooth
marks, marker, mspace, mphase
rays, arrowl, arroww, rspace, rphase
builtin function, documented at i0/graph.i line 362
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
plmk,
limits,
logxy,
range,
fma,
hcp
|
pli
|
pli, z
or pli, z, x1, y1
or pli, z, x0, y0, x1, y1
plots the image Z as a cell array -- an array of equal rectangular
cells colored according to the 2-D array Z. The first dimension
of Z is plotted along x, the second dimension is along y.
If Z is of type char, it is used "as is", otherwise it is linearly
scaled to fill the current palette, as with the bytscl function.
(See the bytscl function for explanation of top, cmin, cmax.)
As for plf and plfp, Z may also be a 3D array with 1st dimension 3
of char giving the [r,g,b] components of each color. See the
color keyword for cautions about using this if you do not have
a true color display.
If X1 and Y1 are given, they represent the coordinates of the
upper right corner of the image. If X0, and Y0 are given, they
represent the coordinates of the lower left corner, which is at
(0,0) by default. If only the Z array is given, each cell will be
a 1x1 unit square, with the lower left corner of the image at (0,0).
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide, top, cmin, cmax
builtin function, documented at i0/graph.i line 576
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
limits,
logxy,
range,
fma,
hcp,
palette,
bytscl,
histeq_scale
|
plm
|
plm, y, x, boundary=0/1, inhibit=0/1/2
or plm, y, x, ireg, boundary=0/1, inhibit=0/1/2
or plm, boundary=0/1, inhibit=0/1/2
plots a mesh of Y versus X. Y and X must be 2-D arrays with equal
dimensions. If present, IREG must be a 2-D region number array
for the mesh, with the same dimensions as X and Y. The values of
IREG should be positive region numbers, and zero for zones which do
not exist. The first row and column of IREG never correspond to any
zone, and should always be zero. The default IREG is 1 everywhere
else. If present, the BOUNDARY keyword determines whether the
entire mesh is to be plotted (boundary=0, the default), or just the
boundary of the selected region (boundary=1). If present, the
INHIBIT keyword causes the (X(,j),Y(,j)) lines to not be plotted
(inhibit=1), or the (X(i,),Y(i,)) lines to not be plotted (inhibit=2).
By default (inhibit=0), mesh lines in both logical directions are
plotted.
The Y, X, and IREG arguments may all be omitted to default to the
mesh set by the most recent plmesh call.
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
type, width, color
region
builtin function, documented at i0/graph.i line 378
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
plmesh,
limits,
logxy,
range,
fma,
hcp
|
plmesh
|
plmesh, y, x, ireg, triangle=tri_array
or plmesh
sets the default mesh for subsequent plm, plc, plv, and plf calls.
In the second form, deletes the default mesh (until you do this,
or switch to a new default mesh, the default mesh arrays persist and
take up space in memory). The Y, X, and IREG arrays should all be
the same shape; Y and X will be converted to double, and IREG will
be converted to int. If IREG is omitted, it defaults to IREG(1,)=
IREG(,1)= 0, IREG(2:,2:)=1; that is, region number 1 is the whole
mesh. The triangulation array TRI_ARRAY is used by plc; the
correspondence between TRI_ARRAY indices and zone indices is the
same as for IREG, and its default value is all zero.
The IREG or TRI_ARRAY arguments may be supplied without Y and X
to change the region numbering or triangulation for a given set of
mesh coordinates. However, a default Y and X must already have been
defined if you do this.
If Y is supplied, X must be supplied, and vice-versa.
builtin function, documented at i0/graph.i line 405
|
SEE ALSO:
|
plm,
plc,
plv,
plf,
plfp
|
plmk
|
plmk, y,x
Make a scatter plot of the points Y versus X. If X is nil,
it defaults to indgen(numberof(Y)). By default, the marker
cycles through 7 predefined marker shapes. You may specify a shape
using the marker= keyword, line width using the width= keyword (you
get solid fills for width>=10), color using the color= keyword.
You can also use the msize= keyword to scale the marker (default
msize=1.0). You can change the default width, color, or msize
using the plmk_default function.
The predefined marker= values are:
marker=
1 square
2 cross
3 triangle
4 circle
5 diamond
6 cross (rotated 45 degrees)
7 triangle (upside down)
You may also put marker=[xm,ym] where xm and ym are vectors
of NDC coordinates to design your own custom marker shapes.
interpreted function, defined at i0/graph.i line 1477
|
SEE ALSO:
|
plmk_default,
plg,
pleb
|
plmk_default
|
plmk_default, color=color, msize=msize, width=width
sets default color, msize, and width values for plmk. Use
width=10 to get solid fills. With no parameters, plmk_default
restores the initial default values.
interpreted function, defined at i0/graph.i line 1546
|
SEE ALSO:
|
plmk
|
plot
|
plot
struct plot {
float x_axis(10), y_axis(10);
int npts;
pointer label;
l_frame view;
}
structure, defined at i/testb.i line 888
|
plq
|
plq
or plq, n_element
or plq, n_element, n_contour
or legend_list= plq()
or properties= plq(n_element, n_contour)
Called as a subroutine, prints the list of legends for the current
coordinate system (with an "(H)" to mark hidden elements), or prints
a list of current properties of element N_ELEMENT (such as line type,
width, font, etc.), or of contour number N_CONTOUR of element number
N_ELEMENT (which must be contours generated using the plc command).
Called as a function, returns either the list of legend strings, or a
list of pointers to the values of the various element properties.
Elements and contours are both numbered starting with one; hidden
elements or contours are included in this numbering.
The PROPERTIES list returned by plq is a list of pointers to the
relevent properties for the specified graphical element. Each
possible property has a particular index in the returned PROPERTIES
list as follows:
*PROPERTIES(1) int([element type (0 for none, 1 for plg, 2 for pldj,
3 for plt, 4 for plm, 5 for plf,
6 for plv, 7 for plc, 8 for pli,
9 for plfp),
hide flag])
*PROPERTIES(2) string(legend)
*PROPERTIES(3) int array, depends on type (names match keywords):
1 plg: [color, type, marks, mcolor, marker, rays, closed, smooth]
2 pldj: [color, type]
3 plt: [color, font, path, justify, opaque]
4 plm: [color, type, region, boundary, inhibit]
5 plf: [region, edges, ecolor, rgb_flag]
6 plv: [region, color, hollow]
7 plc: [region, color, type, marks, mcolor, marker, smooth]
8 pli: nil
9 plfp: [edges, ecolor, rgb_flag]
*PROPERTIES(4) double array, depends on type (names match keywords):
1 plg: [width, msize, mspace, mphase, rspace, rphase, arrowl, arroww]
2 pldj: [width]
3 plt: [height, x, y]
4 plm: [width]
5 plf: [ewidth]
6 plv: [width, aspect, scale]
7 plc: [width, msize, mspace, mphase]
8 pli: [x0, x1, y0, y1]
*PROPERTIES(5) long array, depends on type (names match arguments):
1 plg: [npoints, &x, &y]
2 pldj: [npoints, &x0, &y0, &x1, &y1]
3 plt: [nchars, &text]
4 plm: [imax, jmax, &x, &y, &ireg]
5 plf: [imax, jmax, &x, &y, &ireg, &colors]
6 plv: [imax, jmax, &x, &y, &ireg, &vx, &vy]
7 plc: [imax, jmax, &x, &y, &ireg, &z, &triangle, nlevs, &levs]
8 pli: [imax, jmax, &colors]
9 plfp: [n, &x, &y, &colors, &pn]
You can use the reshape function to peek at the data at the addresses
returned in PROPERTIES(5) as longs. The appropriate data types are:
char for text, int for ireg, short for triangle, char for colors, and
double for everything else. In a plf, colors is (imax-1)-by-(jmax-1).
Although PROPERTIES(5) returns pointers to the data plotted, attempting
to poke new values into this data will not produce immediate changes
to your plot, since the graphics package does not realize that anything
has changed. Use pledit to make changes to plotted elements.
The plq function always operates on the current coordinate system
in the current graphics window; use window and plsys to change these.
builtin function, documented at i0/graph.i line 1134
|
SEE ALSO:
|
window,
plsys,
pledit,
pldefault,
plg
|
plray
|
plray, ray
where RAY is a vector of length 5 representing [x, y, z, theta, phi]
-- a point (x,y,z) on the ray, and the ray direction (theta,phi)
relative to the z-axis. The ray hyperbola is plotted with the
z-axis horizontal. The portion of the ray plotted is determined
by the plray_lims command, which must be issued prior to the first
plray.
The 3 and 6 component ray formats are also accepted.
interpreted function, defined at i/rays.i line 340
|
SEE ALSO:
|
plray_lims,
dirt_rays,
internal_rays
|
plray_lims
|
plray_lims, zmin, zmax, rmax
sets the (z,r) coordinate limits for the plray command. Subsequent
rays will be clipped to the region from z=ZMIN to z=ZMAX, and from
r=0 to r=RMAX.
interpreted function, defined at i/rays.i line 475
|
SEE ALSO:
|
plray
|
plsys
|
plsys, n
or plsys(n) or plsys()
sets the current coordinate system to number N in the current
graphics window. If N equals 0, subsequent elements will be
plotted in absolute NDC coordinates outside of any coordinate
system. The default style sheet "work.gs" defines only a single
coordinate system, so the only other choice is N equal 1. You
can make up your own style sheet (using a text editor) which
defines mulitple coordinate systems. You need to do this if
you want to display four plots side by side on a single page,
for example. The standard style sheets "work2.gs" and "boxed2.gs"
define two overlayed coordinate systems with the first labeled
to the right of the plot and the second labeled to the left of
the plot. When using overlayed coordinate systems, it is your
responsibility to ensure that the x-axis limits in the two
systems are identical.
Return value is coordinate system setting before this call;
input n may be nil to retrieve this without changing it. Return
value can be <0 if the information is unavailable for some reason.
builtin function, documented at i0/graph.i line 336
|
SEE ALSO:
|
window,
limits,
plg
|
plt
|
plt, text, x, y, tosys=0/1
plots TEXT (a string) at the point (X,Y). The exact relationship
between the point (X,Y) and the TEXT is determined by the
justify keyword. TEXT may contain newline ("\n") characters
to output multiple lines of text with a single call. The
coordinates (X,Y) are NDC coordinates (outside of any coordinate
system) unless the tosys keyword is present and non-zero, in
which case the TEXT will be placed in the current coordinate
system. However, the character height is NEVER affected by the
scale of the coordinate system to which the text belongs.
Note that the pledit command takes dx and/or dy keywords to
adjust the position of existing text elements.
The characters ^, _, and ! are treated specially in TEXT.
^ begins a superscript, _ begins a subscript, and ! causes the
following character to be rendered using the symbol font. As
special cases, !^, !_, and !! render the ^, _, and ! characters
themselves. However, if ! is the final character of TEXT
(or immediately before a newline in multiline text), it
loses its special meaning. TEXT has just three modes: ordinary,
superscript, and subscript. A ^ character enters superscript
mode from ordinary or subscript mode, and returns to ordinary
mode from superscript mode. A _ enters subscript mode, except
from subscript mode it returns to ordinary mode. For example,
Euclid said, "!pr^2", and Einstein said, "G_!s!n_=8!pT_!s!n".
One final special escape: !] produces the ^ character in the
symbol font (it is a perpendicular sign, whereas ] is just ]).
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
color, font, height, opaque, orient, justify
builtin function, documented at i0/graph.i line 615
|
SEE ALSO:
|
plt1,
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
pledit,
limits,
range,
fma,
hcp,
pltitle
|
plt1
|
plt1, text, x, y
same as plt, but TEXT, X, and Y may be arrays to plot multiple
strings. The tosys= keyword works as for plt.
KEYWORDS: color, font, height, opaque, orient, justify
interpreted function, defined at i0/graph.i line 651
|
SEE ALSO:
|
plt
|
pltitle
|
pltitle, title
Plot TITLE centered above the coordinate system for any of the
standard Gist styles. You may want to customize this for other
plot styles.
interpreted function, defined at i0/graph.i line 669
|
SEE ALSO:
|
plt,
xytitles
|
plv
|
plv, vy, vx, y, x, scale=dt
or plv, vy, vx, y, x, ireg, scale=dt
or plv, vy, vx, scale=dt
plots a vector field (VX,VY) on the mesh (X,Y). Y, X, and IREG are
as for plm. The VY and VX arrays must have the same shape as Y and X.
The Y, X, and IREG arguments may all be omitted to default to the
mesh set by the most recent plmesh call.
The SCALE keyword is the conversion factor from the units of
(VX,VY) to the units of (X,Y) -- a time interval if (VX,VY) is a velocity
and (X,Y) is a position -- which determines the length of the
vector "darts" plotted at the (X,Y) points. If omitted, SCALE is
chosen so that the longest ray arrows have a length comparable
to a "typical" zone size.
You can use the scalem keyword in pledit to make adjustments to the
SCALE factor computed by default.
The following keywords are legal (each has a separate help entry):
KEYWORDS: legend, hide
type, width, color, smooth
marks, marker, mspace, mphase
triangle, region
builtin function, documented at i0/graph.i line 485
|
SEE ALSO:
|
plg,
plm,
plc,
plv,
plf,
pli,
plt,
pldj,
plfp,
plmesh,
pledit,
limits,
logxy,
range,
fma,
hcp
|
plwf
|
plwf, z
or plwf, z, y,x
plots a 3-D wire frame of the given Z array, which must have the
same dimensions as the mesh (X, Y). If X and Y are not given, they
default to the first and second indices of Z, respectively.
The drawing order of the zones is determined by a simple "painter's
algorithm", which works fairly well if the mesh is reasonably near
rectilinear, but can fail even then if the viewpoint is chosen to
produce extreme fisheye perspective effects. Look at the resulting
plot carefully to be sure the algorithm has correctly rendered the
model in each case.
KEYWORDS: fill -- optional colors to use (default is to make zones
have background color), same dimension options as
for z argument to plf function
shade -- set non-zero to compute shading from current
3D lighting sources
edges -- default is 1 (draw edges), but if you provide fill
colors, you may set to 0 to supress the edges
ecolor, ewidth -- color and width of edges
cull -- default is 1 (cull back surfaces), but if you want
to see the "underside" of the model, set to 0
scale -- by default, Z is scaled to "reasonable" maximum
and minimum values related to the scale of (X,Y).
This keyword alters the default scaling factor, in
the sense that scale=2.0 will produce twice the
Z-relief of the default scale=1.0.
cmax -- the ambient= keyword in light3 can be used to
control how dark the darkest surface is; use this
to control how light the lightest surface is
the lightwf routine can change this parameter
interactively
interpreted function, defined at i/plwf.i line 13
|
SEE ALSO:
|
lightwf,
plm,
plf,
orient3,
light3,
window3,
limit3
|
pnm_colorize
|
color_image= pnm_colorize(image)
colorize the width-by-height array IMAGE, returning a 3-by-
width-by-height array, suitable for use with pnm_write.
The current graphics palette is used to perform the colorization.
The keywords cmin=, cmax=, and top= are recognized and have the
same meaning as for the plf, pli, and bytscl functions.
interpreted function, defined at i/pnm.i line 416
|
SEE ALSO:
|
pnm_write,
bytscl
|
pnm_display
|
pnm_display, image
Attempt to display the IMAGE with the pli command and a pseudo-color
palette. The IMAGE must be a 3-by-width-by-height array of RGB
pixel values. If called as a function, the return value is the
width-by-height array of pixels which index into the new palette.
The palette is returned as the external variables red, green, and
blue. The new palette is both coarse and slow to compute.
The size= keyword can be used to set the palette size. The default
is 200 colors, the size of all the distribution palettes.
The flip=1 keyword can be used to flip the image bottom for top.
The square=1 limits flag is set; use
limits,square=0
to return to the default non-square plot limits.
interpreted function, defined at i/pnm.i line 219
|
SEE ALSO:
|
pnm_read
|
pnm_read
|
image= pnm_read(filename)
or image= pnm_read(filename, noflip)
read a PBM, PGM, or PPM image from FILENAME. PBM and PGM files
result in width-by-height arrays; PPM files result in 3-by-width-
by-height arrays. If NOFLIP is present and non-zero, the returned
image is in exactly the order stored in FILENAME. Otherwise, the
height dimension is reversed, since images in the files read top
to bottom, while the Yorick image plotting commands go bottom to
top.
interpreted function, defined at i/pnm.i line 35
|
SEE ALSO:
|
pnm_display,
pnm_write
|
pnm_write
|
pnm_write, image, filename)
or pnm_write, image, filename, noflip)
write IMAGE to a PBM, PGM, or PPM file called FILENAME. If
NOFLIP is present and non-zero, the image in FILENAME is stored
in exactly the order of IMAGE in memory. Otherwise, the height
dimension is reversed, since images in the files read top to
bottom, while the Yorick image plotting commands go bottom to
top.
If IMAGE is a 3-by-width-by-height array, a PPM will be written.
Otherwise, IMAGE must be a width-by-height array. If IMAGE
contains at most two distinct values, a PBM will be written,
otherwise a PGM. You can force a PGM using the bits=8 keyword.
If IMAGE is of type char, it will be used as is, otherwise it
will be scaled to the range 0 to 255. (Note that for a PPM, this
means the largest single rgb component value sets the scale.)
If the text= keyword is present and non-zero, a text PNM file
will be written; the default is to write a binary or raw PNM.
If the noscale=1 keyword is supplied, the IMAGE will not be
scaled to the range 0 to 255. In this case, the IMAGE must
have an integer data type with minimum value >=0. Note that
if max(image)>255, a text PGM or PPM file will be written
(overriding the text= keyword). Raw PNM is char-only.
If bits= is not specified, then noscale=1 forces pnm_write to
guess the value you intended the brightest component value.
If IMAGE is not color, the guess is bits=1 if there are only
1 or 2 values, bits=8 if max(IMAGE)<256, and bits=16 otherwise.
For color IMAGE, the guess is either bits=8 or bits=16.
Normally, PGM and PPM files have a pixel or color component
size of 8 bits, so they run from 0 (darkest) to 255 (brightest).
With bits= you can force a different maximum value. Use bits=8
to force a binary IMAGE to be written as a PGM. The largest
legal value of bits is 16, the smallest is 1.
interpreted function, defined at i/pnm.i line 287
|
SEE ALSO:
|
pnm_colorize,
pnm_read
|
poly
|
poly(x, a0, a1, a2, ..., aN)
returns the polynomial A0 + A1*x + A2*x^2 + ... + AN*X^N
The data type and dimensions of the result, and conformability rules
for the inputs are identical to those for the expression.
builtin function, documented at i0/std.i line 655
|
popen
|
f= popen(command, mode)
opens a pipe to COMMAND, which is executed as with the system
function. If MODE is 0, the returned file handle is open for
reading, and you are reading the stdout produced by COMMAND.
If MODE is 1, f is opened for writing and you are writing to
the stdin read by COMMAND.
builtin function, documented at i0/std.i line 1325
|
SEE ALSO:
|
open,
system
|
pr1
|
pr1(x)
returns text representing expression X, equivalent to print(X)(1).
interpreted function, defined at i0/std.i line 434
|
SEE ALSO:
|
print,
swrite
|
prefix_comment
|
prefix_comment(line)
the default comment detector function for prefix_read, makes
blank lines and any line beginning with "#" as its first non-blank
character a comment.
interpreted function, defined at i/prefix.i line 90
|
prefix_find
|
prefix_find(f, prefix)
scan to the first line of text file F which begins with the
blank delimited prefix PREFIX. (You may specify other delimiters
by giving prefix_find a DELIMIT keyword, whose value will be
passed to the strtok function.) The return value is 1 if such
a line was found, 0 if not. In the first case, F will be positioned
to reread the prefixed line; in the second case, F will be at the
end-of-file.
interpreted function, defined at i/prefix.i line 11
|
SEE ALSO:
|
prefix_read,
prefix_write,
strtok
|
prefix_read
|
value_array= prefix_read(f, prefix)
reads lines of text file F which begin with the blank delimited
prefix PREFIX. (You may specify other delimiters by giving
prefix_read a DELIMIT keyword, whose value will be passed to the
strtok function.) Stops when a line not beginning with that
prefix is encountered. You may also supply a COMMENT keyword,
which should be a function accepting a string argument and
returning 0 to indicate that the line is not a comment line,
and 1 to indicate that it is a comment. By default, blank lines
and lines beginning with "#" are taken as comments and skipped.
The returned VALUE_ARRAY is [] if no PREFIX lines were found,
and an array of type double and length equal to the total number
of numbers Ni:
prefix N1 N2 N3 N4
prefix N5 N6
prefix ... Nn
interpreted function, defined at i/prefix.i line 36
|
SEE ALSO:
|
prefix_find,
prefix_write,
prefix_comment,
strtok
|
prefix_write
|
prefix_read, f, prefix, value_array
writes lines of text file F which begin with the prefix PREFIX:
prefix N1 N2 N3 N4 N5
prefix N6 N7 N8 N9 N10
prefix N11 N12
The format is %14.6e by default, but you can adjust the ".6" by
specifying an NDIGITS keyword (6 is the default).
Yorick will put as many numbers as fit within 79 characters by
default, and each successive line begins with PREFIX. You can
change this default line width by specifying a WIDTH keyword
(default 79).
interpreted function, defined at i/prefix.i line 114
|
SEE ALSO:
|
prefix_find,
prefix_read
|
print
|
print, object1, object2, object3, ...
or print(object1, object2, object3, ...)
prints an ASCII representation of the OBJECTs, in roughly the format
they could appear in Yorick source code. When invoked as a subroutine
(in the first form), output is to the terminal. When invoked as a
function (int the second form), the output is stored as a vector of
strings, one string per line that would have been output.
Printing a structure definition prints the structure definition;
printing a function prints its "func" definition; printing files,
bookmarks, and other objects generally provides some sort of
useful description of the object.
builtin function, documented at i0/std.i line 419
|
SEE ALSO:
|
pr1,
print_format,
write,
exit,
error,
nameof,
typeof
|
print_format
|
print_format, line_length, char=, short=, int=, float=,
double=, complex=, pointer=
sets the format string the print function will use for each of
the basic data types. Yorick format strings are the same as the
format strings for the printf function defined in the ANSI C standard.
The default strings may be restored individually by setting the
associated format string to ""; all defaults are restored if
print_format is invoked with no arguments. The default format strings
are: "0x%02x", "%d", "%d", "%ld", "%g", "%g", and "%g%+gi".
Note that char and short values are converted to int before being
passed to printf, and that float is converted to double.
If present, an integer positional argument is taken as the line
length; <=0 restores the default line length of 80 characters.
builtin function, documented at i0/std.i line 441
|
SEE ALSO:
|
print,
write,
nameof,
typeof
|
process_argv
|
remaining= process_argv()
-or- remaining= process_argv("your startup message")
Performs standard command line processing. This function is
invoked by the default custom.i file (in $Y_SITE/i); you
can also invoke it from your personal ~/yorick/custom.i file.
The process_argv calls get_argv, removes any arguments of
the form "-ifilename" or "-i filename" (the latter is a pair of
arguments. It returns any arguments not of this form as its
result, after including any filenames it found in the order
they appeared on the command line.
The optional string argument may be an array of strings to print
a multi-line message.
A Yorick package may define the function get_command_line in
order to feed process_argv something other than get_argv.
interpreted function, defined at i0/std.i line 1735
|
SEE ALSO:
|
batch
|
propersize
|
propersize(dl,z,h0=,k=,lambda0=,Omega_m=,q0=,silent=)
Compute the seperation (in kpc) of two line of sight sparated
by dtheta arcseconds.
INPUTS: dtheta - angular separation (in ")
z - redhsift values
EXAMPLE: plot the separation in kpc beetween two line of sight
separated with 2" as a function of redshift for the
default cosmology (Lambda = 0.7, Omega_m=0.3) up to
z = 5
z = span(0,5,100)
plg,propersize(2,z),z;
xytitles,"z","Proper Size (kpc)"
interpreted function, defined at contrib/cosmo.i line 302
|
SEE ALSO:
|
lumdist,
ldist,
cosmo_param,
angdist,
angsize
|
ptcen
|
ptcen(zncen)
or ptcen(zncen, ireg)
returns point centered version of the 2-D zone centered array ZNCEN.
The result is imax-by-jmax if ZNCEN is (imax-1)-by-(jmax-1).
If the region number array IREG is specified, zones with region
number 0 are not included in the point centering operation.
Note that IREG should have dimensions imax-by-jmax; the first
row and column of IREG are ignored.
Without IREG, ptcen(zncen) is equivalent to zncen(pcen,pcen).
interpreted function, defined at i0/std.i line 2860
|
SEE ALSO:
|
zncen,
uncen
|
|