PLOT
The PLOT keyword supports a number of arguments used to simplify the task of creating plots of numeric data.
Syntax:
PLOT NEW PLOT TITLE, string PLOT TITLEX, string PLOT TITLEY, string PLOT BANNER, string PLOT WINASPECT, type PLOT COMM1, string PLOT COMM2, string PLOT COMM3, string PLOT COMM4, string PLOT COMM5, string PLOT COMM6, string PLOT RANGEX, minx, maxx PLOT RANGEY, miny, maxy PLOT CHECK, x_increment, y_increment PLOT TICK, x_increment, y_increment PLOT FORMATX, format_string PLOT FORMATY, format_string PLOT DATA, x_array, y_array, number_of_points, color, style, options PLOT LINE, x1, y1, x2, y2 PLOT LABEL, x, y, angle, size, string PLOT GO
Discussion:
PLOT NEW is used to initialize a new plot. All data related to any previously generated plot is discarded. This should always be the first PLOT command used when making a new graphic.
PLOT TITLE, PLOT TITLEX, and PLOT TITLEY are used to define the main plot title, the x-axis title, and the y-axis title, respectively. The parameter "string" may be a literal string in quotes or may be a string variable.
PLOT BANNER is used to define the banner title. The parameter "string" may be a literal string in quotes or may be a string variable.
PLOT WINASPECT defines the aspect ratio format of the window that will display the window. The valid values for type are the integers 0 through 3, which yield aspect ratios of 4x3, 5x3, 3x4, and 3x5, respectively. If no WINASPECT command is issued a default aspect ratio is used.
PLOT COMMx is used to define up to 6 comments that appear on the bottom of the plot. The parameter "string" may be a literal string in quotes or may be a string variable.
PLOT RANGEX and PLOT RANGEY define the minimum and maximum values of the plot in the x- and y- directions respectively. If no RANGEX or RANGEY command is issued, a default range will be selected.
PLOT CHECK is used to define the size of the "X" marks used to mark data points in the PLOT DATA command. The units are dimensionless fractions relative to the width of the display. If no CHECK command is issued, a default size will be selected.
PLOT TICK is used to define the increments between tick marks on the x- and y-axis, respectively. If no TICK command is issued, a default increment will be selected.
PLOT FORMATX and PLOT FORMATY are used to define the format strings for numeric labels on the x- and y-axis, respectively. The parameter "format_string" may be a literal string in quotes or may be a string variable. The format_string must be a valid C-language format specifier. A common format string is "%M.nf" where M is the total number of spaces in the output string and n is the number of figures after the decimal point. For example, the value for pi will print as "3.1415" if the format string is "%6.4f". To define an exponential format, the format string is of the form "%M.nE" which would yield a total of M characters and n is the number of figures after the decimal point. The value for pi would print as "3.14E+000" if the format_string was "%9.3E". If no FORMATX or FORMATY is specified a default format is used.
PLOT DATA is used to define a series of data points to be plotted. The variables x_array and y_array MUST be array variables of 1 dimension. For information on defining array variables see "Array variables". The number_of_points defines how many points in the array are to be used. The color argument is 0 for black, or 1-16 to select different pen colors. To define pen colors, see "Colors 1-12, Colors 13-24". The style argument defines the line style; the current supported values are 0 for a solid line, or 1-4 for various styles of dashed lines. The options value is 0 for no marks indicating the location of data points, 1 for both a line and data point marks, or 2 for no line and data point marks only. Multiple PLOT DATA commands may be issued, and each will create a separate line or curve to be plotted.
PLOT LINE makes a line between the points (x1, y1) and (x2, y2). The units of x and y here are normalized screen coordinates between 0.0 and 1.0. A maximum of 1000 lines may be defined.
PLOT LABEL prints any text string on the plot starting at the coordinates (x, y). The units of x and y here are normalized screen coordinates between 0.0 and 1.0. The angle is the angle from the +x direction in degrees. The size is a scaling constant greater than 0.0 that defines the size of the font. A size of 1.0 would print at the normal font size, while a value of 1.5 would print at 50% larger than normal size. The parameter "string" may be a literal string in quotes or may be a string variable. A maximum of 100 labels may be defined.
PLOT GO uses all settings and data from previous PLOT commands and generates the desired plot, and displays the plot in a window. After the plot is generated all the PLOT data is reset as though PLOT NEW had been executed.
Related Keywords:
PLOT2D
Next: