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 340SEE ALSO: window, fma, hcp, pldefault, plg
parsedate2
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. DHM modified for yorick-1.6 23/Jan/05 Interpreted function, defined at i/string.i line 52SEE 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 1441
pc_primitives
pc_primitives, file sets FILE primitive data types to be native to IBM PC. Interpreted function, defined at i0/std.i line 2937
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 1203
pdf, name writes the picture in the current graphics window to the Adobe PDF file NAME+".pdf" (i.e.- the suffix .pdf is added to NAME). The pdf file is intended to be imported into MS PowerPoint or other commercial presentation software, or into in pdftex or pdflatex documents; it is cropped. The result should be equivalent to running the epstopdf utility (which comes with TeX, see www.tug.org) on the eps file produced by the eps command. This function requires ghostscript. Any hardcopy file associated with the current window is first closed, but the default hardcopy file is unaffected. As a side effect, legends are turned off and color table dumping is turned on for the current window. The external variable EPSGS_CMD contains the command to start ghostscript. Interpreted function, defined at i0/graph.i line 283SEE ALSO: eps, hcps, window, fma, hcp, hcp_finish, plg
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 96SEE 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 265SEE 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 10SEE 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 29SEE 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 1082SEE 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 1145SEE ALSO: pl3surf, slice3, slice2, rot3, light3, split_palette
pl3tree_prt
pl3tree_prt Interpreted function, defined at i/slice3.i line 1432
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 49SEE 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 482SEE 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 10SEE 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 1301SEE 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 659SEE 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 1866SEE 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 1266SEE 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 566SEE 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 1658SEE 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 602SEE 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 418SEE 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 632SEE 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 434SEE 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 461SEE 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 1553SEE 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 1622SEE ALSO: plmk
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 1197SEE 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 340SEE 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 475SEE 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 392SEE 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 671SEE 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 707SEE 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 725SEE ALSO: plt, xytitles
plug_dir
plug_dir, dirname causes plug_in to look in DIRNAME for dynamic library files, in addition to Y_HOME/lib. DIRNAME may be an array of strings to search multiple directories. Builtin function, documented at i0/std.i line 2391SEE ALSO: plug_in
plug_in
plug_in, "pkgname" Dynamically link to yorick package "pkgname". The compiled functions of the package are in a shared object file; these files have a naming convention which differs slightly on different platforms. On most UNIX systems (including Mac OS X), the binary file is named pkgname.so. On MS Windows systems, the binary file is named pkgname.dll. On HPUX systems, the name is pkgname.sl. The "pkgname" argument to plug_in does not include this platform-dependent file extension, so that the yorick code containing the plug_in command will be portable. After dynamically linking the compiled routines in the pkgname shared object binary, yorick runs the function (which must be present) yk_pkgname in order to initialize the package. At minimum yk_pkgname returns lists of the new compiled (builtin) functions defined by the package and the names by which they may be invoked by interpreted code. Additionally, yk_pkgname returns a list of files to be included containing interpreted wrapper functions for the compiled routines and DOCUMENT comments for the help system. Conventionally, these include files are located in the Y_SITE/i0 or Y_HOME/lib directories, and the name (of one) of the file(s) is pkgname.i. If the package has been statically linked (i.e.- not by plug_in), these .i files are automatically included when yorick starts. However, if the package is loaded dynamically by plug_in, you must arrange to include one or all of these .i files as you would any interpreted package (e.g.- by the autoload or require functions, or manually). The upshot of all this is that the plug_in function is designed to be placed at the top of the .i files associated with the package. You are not supposed to call plug_in manually, rather when you #include (or autoload) a .i file which needs compiled functions, that .i file invokes plug_in to perform any required dynamic linking to compiled code. Thus, the end user does not do anything differently for a package that uses dynamically loaded compiled code, than for a purely interpreted package. Yorick dynamic library support solves a distribution problem. For debugging and creating compiled packages for your own use, you want to build special versions of yorick with your compiled routines statically linked. In order to support platforms on which there is no dynamic linking, if you call the plug_in function for a package that is statically linked (e.g.- plug_in,"yor"), the function will silently become a no-op when it notices that the "pkgname" package was already loaded at startup. Builtin function, documented at i0/std.i line 2339SEE ALSO: plug_dir, include, require, autoload
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 541SEE 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 13SEE ALSO: lightwf, plm, plf, orient3, light3, window3, limit3
png_map
image = png_map(full_image, nfo) maps FULL_IMAGE to png-stored values, according to the pCAL information in NFO. The NFO parameter may be either the array of pointers as returned by png_read, or an array of reals as for *nfo(4) (see png_read). You can use png_pcal to compute an NFO mapping tailored to IMAGE. Interpreted function, defined at i0/png.i line 367SEE ALSO: png_pcal, png_scale, png_read, png_write
png_pcal
pcal = png_pcal(image) or pcal = png_pcal(image, depth) KEYWORDS: cmin=, cmax=, res=, log= cmin, cmax clip image to these minimum and maximum values res image "resolution", or minimum step size log non-zero forces log map if image all positive or all negative returns 8-element pCAL png mapping for IMAGE, appropriate for use as pcal= keyword in png_write. The png_map function applies pcal to produce the as-stored char or short array; the png_scale function applies pcal to recreate the original IMAGE from the as-stored array. There are three kinds of pCAL mappings: linear, log, and asinh. Linear and log scales are familiar; the asinh scale is a modified log scale that can be used for arrays that change sign: linear: image = a*stored + b log: image = b * exp(a*stored) asinh: image = b * sinh(a*(stored - mx/2)) You can specify a bit DEPTH for the stored array, which can be between 2 and 16 inclusive. For bit depth 1, just threshhold the image (image>const_thresh). By default, for integer IMAGE, DEPTH is the smallest depth that covers the range of IMAGE values, but never more than 16. For float or double IMAGE, the default DEPTH is always 16. If IMAGE has any integer data type, the pCAL mapping will always be linear; use IMAGE+0.0 if you want a log or asinh map. The png pCAL definition allows b<0 in the log scale, so it can be used for image values that are either all positive or all negative. In either case, the integer stored values take equal ratio steps from the minimum to the maximum image values (or cmin and cmax). For the linear scale, of course, each step in the stored integer represents an constant increment in the image value. The asinh scale is a logarithmic ratio scale for stored values near 0 or mx (the maximum stored integer value), reverting to a linear scale near the middle of its range where the image value passes through zero. To get the asinh scale, you must specify the res= keyword: You must specify the smallest step size for the asinh scale by setting the res= keyword. For a log scale, the res= value will replace the actual minimum array value or cmin value (or cmax if image is all negative values), clipping any smaller absolute values. If mx is large enough to cover the whole scale with the given res= value in linear steps, a linear scale will be used. You can specify log=1 to force log scaling if image is all positive or all negative. Interpreted function, defined at i0/png.i line 430SEE ALSO: png_scale, png_write, png_read
png_read
image = png_read(filename) or image = png_read(filename, depth, nfo) Read png file FILENAME. The returned IMAGE is either an array of char or short, unless type= is specified (see below). The IMAGE may have a leading dimension of 2 if it is gray+alpha, 3 if it is rgb, or 4 if it is rgba. In the second form, DEPTH and NFO must be simple variable references. NFO is set to a pointer array to descriptive information by png_read: *nfo(1) = PLTE 3-by-N char array of palette rgb values *nfo(2) = tRNS char array of alpha (opacity) values corresponding to PLTE or single gray or rgb short value (transparent) *nfo(3) = bKGD single gray or rgb short value note that bKGD and the single value tRNS have the same range and meaning as a pixel value, in particular, for a pseudocolor image, they represent a palette index *nfo(4) = pCAL [x0,x1,max,eqtype,p0,p1,p2,p3,...] physical pixel value relation between pixel value and physical value array of double values (see below for meaning) *nfo(5) = pCAL [calibration_name, unit_name] string pair *nfo(6) = sCAL [wide,high,sunit] physical scale of pixels as scanned or printed, sunit 1.0 for meters or 2.0 for radians *nfo(7) = pHYs long [n_xpix,n_ypix,per_meter] values n_xpix,n_ypix are pixels per unit, per_meter is 0 for aspect ratio only, 1 for meters *nfo(8) = tEXt (or zTXt or iTXt) 2-by-N string array of (key,text) *nfo(9) = tIME string value image modification time any or all of these NFO values may be nil. The four character designators (e.g. PLTE) are the png chunk names for the corresponding information. pCAL array of doubles has following meaning: max = 2^depth-1 original = long( floor( (image(i)*(x1-x0)+long(max)/2) / max ) ) + x0 image(i) = long( floor( ((original-x0)*max+long(x1-x0)/2) / (x1-x0) ) ) eqtype = 0 physical = p0 + p1*original/(x1-x0) eqtype = 1 physical = p0 + p1*exp(p2*original/(x1-x0)) eqtype = 2 physical = p0 + p1*p2^(original/(x1-x0)) eqtype = 3 physical = p0 + p1*sinh(p2*(original-p3)/(x1-x0)) If the type= keyword is non-nil and non-zero, the returned value is as if png_scale(image, nfo, type=type), which scales the raw image according to the information in pCAL, or is a no-op if pCAL does not exist. Interpreted function, defined at i0/png.i line 8SEE ALSO: png_write, png_scale
png_scale
image = png_scale(raw_image, nfo, type=type) scales RAW_IMAGE to type TYPE (char, short, int, long, float, or double, according to the pCAL information in NFO. The NFO parameter may be either the array of pointers returned by png_read, or an array of reals as for *nfo(4) (see png_read). Interpreted function, defined at i0/png.i line 291SEE ALSO: png_map, png_read, png_write
png_write
png_write, filename, image or png_write, filename, image, depth, nfo Write png file FILENAME containing IMAGE at the specified DEPTH. The default DEPTH is 8 bits. For grayscale IMAGE, 1<=DEPTH<=16, otherwise depth is 8 or 16. If NFO is specified, it is an array of pointers as described in the help for png_read. You can optionally specify the same information as keywords: palette=[[r0,g0,b0],[r1,g1,b1],...] alpha=[a0,a1,...] if image is simple 2D and palette specified trns=value if image is gray (no palette) [r,g,b] if image is color illegal if image has alpha channel bkgd=value or [r,g,b] suggested background color note that bkgd and trns have the same range and meaning as a pixel value, in particular, for a pseudocolor, a palette index pcal=[x0,x1,max,eqtype,p0,p1,p2,p3,...] pcals=[calibration_name, unit_name] as for pCAL (see png_read) scal=[wide,high,sunit] as for sCAL (see png_read) phys=[n_xpix,n_ypix,per_meter] as for pHYs (see png_read) text=[[key1,text1],[key1,text1],...] recognized keys are: Title, Author, Description, Copyright, Creation Time, Software, Disclaimer, Warning, Source (a device), and Comment time=string modification time (timestamp() is default) When both NFO and keywords are supplied, the keywords override any corresponding value in nfo. If IMAGE has a data type other than short or char, a default pCAL will be supplied if it is a simple grayscale (2D) image. If DEPTH is not supplied, it defaults to 8 if IMAGE is type char and/or if a palette is supplied, or to 16 otherwise. Interpreted function, defined at i0/png.i line 76SEE ALSO: png_read, png_map
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 416SEE 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 219SEE 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 35SEE 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 287SEE ALSO: pnm_colorize, pnm_read
poisson
poisson(navg) returns a Poisson distributed random value with mean NAVG. (This is the integer number of events which actually occur in some time interval, when the probability per unit time of an event is constant, and the average number of events during the interval is NAVG.) The return value has the same dimensions as the input NAVG. The return value is an integer, but its type is double. The algorithm is taken from Numerical Recipes by Press, et. al. Interpreted function, defined at i/random.i line 524SEE ALSO: random, random_n
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 702
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 1946SEE ALSO: open, system
pr1
pr1(x) returns text representing expression X, equivalent to print(X)(1). Interpreted function, defined at i0/std.i line 480SEE 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 11SEE 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 36SEE ALSO: prefix_find, prefix_write, prefix_comment, strtok
prefix_unD
prefix_unD Interpreted function, defined at i/prefix.i line 101
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 114SEE ALSO: prefix_find, prefix_read
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 465SEE 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 487SEE 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 2510SEE ALSO: batch
pt_cross
pt_cross Interpreted function, defined at i/plato.i line 155
pt_cube
pt_cube Interpreted function, defined at i/plato.i line 31
pt_dodec
pt_dodec Interpreted function, defined at i/plato.i line 64
pt_ico
pt_ico Interpreted function, defined at i/plato.i line 51
pt_oct
pt_oct Interpreted function, defined at i/plato.i line 41
pt_solid
pt_solid Interpreted function, defined at i/plato.i line 162
pt_solid2
pt_solid2 Interpreted function, defined at i/plato.i line 177
pt_tet
pt_tet Interpreted function, defined at i/plato.i line 22
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 3643SEE ALSO: zncen, uncen