Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

graph3

Format: graph3( data, x, y, style, title, xlabel, ylabel, zlabel )

Arguments: [real] data Matrix of z-data points

[real] x Optional list of x-values; default = 1..nx

[real] y Optional list of y-values; default = 1..ny

(int) style Optional style declaration; default = G3_DEFSTYLE

(text) title Optional graph title; default = null

(text) xlabel Optional x-axis label; default = null

(text) ylabel Optional y-axis label; default = null

(text) zlabel Optional z-axis label; default = null

Returns: null

Description: Produces a 3-D, graph of data points. The data to be graphed must be composed as a matrix, or list of lists; e.g., [[1,2],[3,4]]. The elements in the matrix must be evenly spaced in both the x- and y-direction. The x- and y-value lists are used only to determine the upper- and lower-limit on each axis.

Once the graph has been displayed, you can rotate the image interactively using the arrow keys. These keys rotate the image in 15-degree increments. Pressing SHIFT in combination with the arrow keys causes the image to rotate in smaller, 5-degree increments. CTRL+Up/Down zooms in/out of the image. CTRL+Left/Right pans the image.

The style arguments for the table, graph, and graph3 primitives are all constructed by adding together a series of pre-defined constants. These constants turn particular attributes on or off. For example, the default graph3 style, G3_DEFSTYLE, is defined as GS_CONTOURFILL + GS_LEGEND + GS_MESH + GS_BOX + GS_GRID + GS_AXES + GS_COLOR. Each of these style constants and all others that can be used are described in the following table:

Graph Styles:

GS_MESH Display a grid on the plotted surface corresponding to the mesh of sample points.

GS_BOX Draw a bounding box around the graph.

GS_AXES Draw x-, y-, and z-axes.

GS_GRID Draw a grid on the x/y plane.

GS_CONTOUR Produce a flat contour graph without perspective and 3-D effects.

GS_CONTOURFILL Shade the surface plot using colors or gray levels to represent different levels in the z-direction.

GS_CONTOURLINES Draw contour lines at the border between discrete levels in the z-direction.

GS_LEGEND Draw a legend relating the contour fill colors to levels in the z-direction.

GS_ASPECT Use the same scale factor to adjust the x-, y- and z-axes. Normally, axes are scaled to fit the window or page on which the graph is drawn. Selecting this style forces one unit in the x-direction to be exactly the same physical length as one unit in the y- and z-directions.

GS_COLOR Use color to distinguish different contour levels. Normally, gray levels are used.

GS_AUTO Automatically reconstruct the graph if any nodes in the system change. Without this option you can explicitly update a graph by clicking the Recalculate button.

Examples: x:=[1,2]

y:=[1,2]

z:=[[1,2],[3,4]]

graph3(z,x,y,G3_DEFSTYLE,"Title","x","y","z")

dph00471.gif

graph3(z,x,y,G3_DEFSTYLE+GS_CONTOUR,"Title","x","y","z")

dph00472.gif

See Also: graph, table

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend