The methods in Plotter (in alphabetical order) are described below. Bear in mind that some of these methods are peculiar to one kind of Plotter and may not do anything at all for another kind (they are present but the body consists only of a Python ``pass'' statement). In other cases their actions may be different depending on the Plotter type. Most users, even those who need to instantiate multiple and/or remote Plotters, will not need to use these methods, as the Graph objects will do the interfacing.
Note that in accordance with Python naming conventions, if you do call any of these methods, then you must precede the method name by the plotter name followed by a period.
add_object (crv) : will add a curve crv to an existing plot. (See plot_object, below.)
add_text (str, x, y, size, color="fg", tosys = 1) : will add the specified text str, in color, to the plot at point (x, y) in data coordinates if tosys is 1, otherwise in absolute window coordinates.
clear_text () : gets rid of all text strings in the plot.
close () : closes the connection to the graphics engine.
do_generic (graf) : apply the graph-generic attributes of the Graph object graf to the plot (generic attributes do not depend on the number of dimensions).
freeze_graph () : keeps a graph from being plotted until send_graph () is called.
move_light (i) : a drawing function which returns 0 if i exceeds the internal variable nframes, otherwise computes lighting angles and calls light3 (See page 57 in Python Gist Graphics Manual) and draw3 (See page 59 in Python Gist Graphics Manual).
move_light_source (graf, angle, nframes) : Makes a movie (See "The movie module and function" on page 80 of Python Gist Graphics Manual) of a moving light source shining on the 3-D geometric object in the Graph object graf. The light source will rotate through angle radians in each of nframes frames.
new_frame () : carries out a frame advance.
plot2d (graf) : A Graph2d object calls plot2d with itself (graf) as argument. plot2d sorts out everything for the graph and then does the plot.
plot3d (graf) : A Graph3d object calls plot3d with itself (graf) as argument. plot3d sorts out everything for the graph and then does the plot.
plot_object (crv) : a general purpose 2-D plotting routine. It should be called with one argument (crv), a Curve, QuadMesh, PolyMap, CellArray, or Lines object. In the case of multiple objects on one graph, the first call only should be to this routine, subsequent calls to add_object. plot_object does some one-time things, such as plotting the titles.
plot_text () : sends the accumulated texts out to the graph (see set_text and clear_text)..
query () : returns -1 if it is not connected to a graphics engine or is but can't seem to find it; 0 if it's not sure; and 1 if it is connected.
quick_plot (graf) : plots without recomputing.
reset_xyequal () : turns off a flag that forces equal scales on the axes.
rotate_graph (axis, angle, nframes) : rotates the current plot about axis, for a total of nframes frames, with rotation through angle in each frame. Uses spin3 (See "The spin3 function" on page 83 in Python Gist Graphics Manual).
send_color_card () : If the Plotter has been told about a color card (or palette) (see set_color_card, below), then apprise the graphics engine of this.
send_generics (graf) :sets up all the things that are generic to any graph. It does not actually do any plotting yet.
send_graph () : causes a plot that has been accumulated after freeze_graph was called, to be plotted.
set_3d_grid_type (gt) : sets what the wire grid will look like in a 3d surface plot in one of the wire modes. The choices for gt are 'x' (x lines only), 'y' (y lines only) and 'xy' (both x and y lines).
set_axis_labels ('x_label', 'y_label', 'z_label', 'yr_label') : All arguments are optional. Default values (from right): ' ', 'Z axis', 'Y axis', 'X axis'.
set_axis_lin (ax) : ax can be 'x', 'y', 'yr', 'z', 'c', or 'all'. The specified axis will have a linear scale.
set_axis_log (ax) : ax can be 'x', 'y', 'yr', 'z', 'c', or 'all'. The specified axis will have a logarithmic scale.
set_axis_max (ax, val) : ax can be 'x', 'y', 'yr', 'z', or 'c'.The maximum of the specified axis will be set to val. val should be a PyFloat object.
set_axis_min (ax, val) : ax can be 'x', 'y', 'yr', 'z', or 'c'. The minimum of the specified axis will be set to val. val should be a PyFloat object.
set_bytscl (cmin, cmax) : ensures that bytscl will be called for the next plf command, with these values of cmin and cmax.
set_c_contours (arg) : sets various properties when doing 4d contour (iso), smooth, or flat plots. It accepts one argument, as follows: if an integer n, sets the number of contours to n. This also clears the contour levels array. Countour levels will be computed automatically from the data. if a string: 'lin' plots the contours linearly spaced. 'log' plots the contours logarithmically spaced. if an array of type Float: sets the contour levels to the values in the array.
set_color_card ( cardspec, now = 0) : indicates a predefined color card (palette) for a plot. cardspec can be the name of a palette or, in Narcisse, an integer n. See the Narcisse manual for the values of n and the color card selected (sec. 4.2.134, parametre_map). If now is set to 1, then the palette will be sent immediately.
set_connect (cn) : tells whether to connect two or more surface plots, which presumably improves masking. cn=1 to connect, cn=0 to disconnect.
set_default_axes_limits () : sets the graphics to compute the maximum and minimum of the axes depending on the data.
set_distance (arg) : sets the distance of the view point from a 3-D plot. If called with no argument, or 0, this distance is effectively infinite. Otherwise it should be called with an integer from 1 to 20. Smaller means closer, and hence somewhat more distortion. The size of the plot is not changed.
set_freeze_each (val) : tells whether or not to re-freeze the graphics after each send_graph call. 1 to re-freeze, 0 not to.
set_grid_type ( string ) : determines how intrusive the axes and coordinate grids are. The legal arguments are: 'none'--no axes and grids are drawn. 'axes'--axes with tick marks. 'wide'--widely spaced grid in x and y (2-D or 3-D). 'full'--narrowly spaced grid in x and y (2-D or 3-D). If no argument is specified, the default is 'axes'.
set_label_type (arg) : determines whether curve labels will be attached to the ends of curves, or enclosed in a box. The allowed arguments are thus 'end' and 'box'.
set_link (ln) : tells whether to link two or more surfaces plotted with different 3d options into one plot (otherwise all surfaces will have the same options). ln=1 to link, ln = 0 not to link. This needs to be set to 1 for all surfaces except the last. Connection must not be set (see set_connect ()). The axes must not be plotted for surfaces after the first.
set_linlin () : sets both x and y axes to linear scale.
set_linlog () : sets x axis to linear, y axis to logarithmic.
set_loglin () : sets x axis to logarithmic, y axis to linear.
set_loglog () : sets both x and y axes to logarithmic scale.
set_mask (arg) : determines whether hidden parts of a 3-D plot will be shown, and if not, what algorithm will be used to determine what is hidden. The allowed arguments and masking algorithm are as follows: 'none'--no masking. in wire grid mode, all grid lines are visible. 'min'--the surface is traced beginning in the corner closest to the observer. 'max'--the surface is traced beginning in the corner farthest from the observer. 'sort'--a cell sorting is carried out to determine the masking.
set_no_concat () : turns off the 2-D and 3-D concatenation mode.
set_text (str, ix) : sets the ixth text to str.
set_text_color (col, ix) : sets the ixth text color to col, which is a color number associated with a color table, or the name of a common color.
set_text_pos (x, y, ix) : positions the ixth text at (x, y), which are real numbers between 0 and 1 giving relative position in the graphics window.
set_text_size (sz, ix) : sets the ixth text size to sz. Narcisse and Gist differ on this (sorry!). In Narcisse, sz represents essentially the number of characters that will fill the width of the graphics screen, so the larger the number, the smaller the text. In Gist, sz is the point size, so the larger the number, the larger the text.
set_title_colors (bottom_color, top_color, left_color, right_color) : All arguments are optional, integers representing a color in some color map, or the names of common colors. Missing arguments default to "fg".
set_titles ('bottom', 'top', 'left', 'right') : All arguments are optional. Missing ones default to ' '.
set_tosys (val) : if val is nonzero, use user coordinates. If zero, use absolute window coordinates. This applies to plotted text only.
set_x_axis_limits (min, max) : sets the limits on the x axis to the specified (pyFloat) sizes.
set_xyequal () : Make the x and y axes the same scale.
set_y_axis ( 'left' , n ) or set_y_axis ( 'right' , n ) : causes curve number n to be associated with the left or right y axis.
set_y_axis_limits (min, max) : sets the limits on the y axis to the specified (pyFloat) sizes.
set_yr_axis_limits (min, max) : sets the limits on the yr axis to the specified (pyFloat) sizes.
set_z_c_switch (sw) : tells whether to switch the roles of the z and c variables in a 4-D plot. sw=1 to do the switch, sw=0 not to do it.
set_z_contours (arg) : sets various properties when doing 3-D contour (iso), smooth, or flat plots. It accepts one argument, as follows: if an integer n, sets the number of contours to n. This also clears the contour levels array. Countour levels will be computed automatically from the data. if a string: 'lin' plots the contours linearly spaced. 'log' plots the contours logarithmically spaced. if an array of type Float: sets the contour levels to the values in the array.
synchronize () : Synchronizes with Narcisse. Important because of socket communication; race conditions can occur. Does nothing in Gist.
type () : Returns NarType or GistType depending on the type of Plotter. (You need to import graftypes in order to test for these.)