General PolarGraph
Synopsis
Constructs from one to five 2D polar graphs from input T (theta, or polar angle) data and R (radius vector) data
Input Ports
User Interface Controls
T Axis crossing position UIfield
R Axis crossing position UIfield
reverse text alignment UItoggle
Label height UIslider, UIfield
Steps for Major tick marks UIfield
Steps for Minor tick marks UIfield
Legend controls:
Legend On/Off UItoggleLabel Height UIslider, UIfield
Title Height UIslider, UIfield
Output Ports
Description
The General PolarGraph macro combines the PolarGraph, PolarAxis, PolarWorld, GraphViewport, and GraphLegend modules to provide a powerful graph creation and display tool. This macro constructs up to five graphs from a single set of T data and up to five sets of R data, and displays the resulting graphs simultaneously.
The T data--the theta, or polar angle data--is input through port 1 as the array valuesT[]. If you do not input T data, General PolarGraph plots the R data against equal intervals from 0 to 360 degrees on the T axis, with the number of intervals for a graph based on the number of values in the corresponding R data array.
The R data--the radius vector data--is input as the arrays valuesR1[] through valuesR n [] (1<= n <=5). The arrays are input through ports 2 through 6; however, it does not matter which or how many ports are used, because General PolarGraph reads in the R data arrays in port order and names them accordingly. For example, if R data is input only through ports 3 and 5, the data at port 3 is the array valuesR1 and the data at port 5 is the array valuesR2.
General PolarGraph assigns to each of the resulting graphs a name that corresponds to the R data array used: Graph1 uses the valuesR1[] array, Graph2 uses the valuesR2[] array, and so forth.
When you execute General PolarGraph, the user interface opens. At the top of the interface is an Object option menu from which you select the set of user interface controls displayed in the remainder of the interface. The following control sets are available:
The Graph controls (the default selection) include:
The current graph; that is, the graph for which attributes are to be set.
General attributes for the current graph; for example, its type and color.
This user interface has the same controls as the Graph module, plus extra controls specific to General PolarGraph.
The Axis controls include the attributes of each axis in the current graph. It has the same controls as the PolarAxis module.
The World controls include the attributes of the World coordinate space created inside the viewport for the current graph. It has the same controls as the PolarWorld module.
The Viewport controls include the attributes of the graph viewport defined in the viewer window for the current graph. It has the same controls as the GraphViewport module.
The Legend controls include the attributes of the legend displayed for the current graph. It has the same controls as the GraphViewport module.
(Optional) An array of data, input to port 1, to be used as the T (theta, or polar angle) values when constructing graphs. If you do not input T data, General PolarGraph plots the R data against equal intervals from 0 to 360 degrees on the T axis, with the number of intervals for a graph based on the number of values in the corresponding R data array.
valuesR1, valuesR2, valuesR3, valuesR4, valuesR5
From one to five arrays of data to be used as the R (radius vector) values when constructing graphs. Each array is input to a port from 2 through 6; however, it does not matter which or how many ports are used, because General PolarGraph reads in the R-data arrays in port order and names them accordingly. For example, if R data is input only to ports 3 and 5, the data at port 3 is valuesR1 and the data at port 5 is valuesR2, with the corresponding graphs having the names Graph1 and Graph2.
Connects the module to a user interface object that contains the module's user interface objects. By default, this input port is connected to the default user interface object in the application in which the module is instanced.
Input Ports
(Optional) An array of data, input to port 1, to be used as the T (theta, or polar angle) values when constructing graphs. If you do not input T data, General PolarGraph plots the R data against equal intervals from 0 to 360 degrees on the T axis, with the number of intervals for a graph based on the number of values in the corresponding R data array.
valuesR1, valuesR2, valuesR3, valuesR4, valuesR5
From one to five arrays of data to be used as the R (radius vector) values when constructing graphs. Each array is input to a port from 2 through 6; however, it does not matter which or how many ports are used, because General PolarGraph reads in the R-data arrays in port order and names them accordingly. For example, if R data is input only to ports 3 and 5, the data at port 3 is valuesR1 and the data at port 5 is valuesR2, with the corresponding graphs having the names Graph1 and Graph2.
Connects the module to a user interface object that contains the module's user interface objects. By default, this input port is connected to the default user interface object in the application in which the module is instanced.
User Interface Controls
An option menu from which to select the user interface controls to be displayed in the lower part of the General Graph user interface. The options are:
Graph Controls
The Graph controls, which specify the current graph (the graph whose attributes are to be set) and set attribute values for that graph, include the following:
Graph1, Graph2, Graph3, Graph4, Graph5
A set of radio buttons with which to specify the current graph : the graph whose attribute values you want to set (the default is Graph1). Which controls are displayed vary depending on the graph type selected. For example, if Graph2 is a bar graph and Graph3 is a scatter graph, the user interface displays only the Graph controls appropriate to a bar graph when you select Graph2 but only those appropriate to a scatter graph when you select Graph3.
A text box in which to type an integer value that specifies the current graph's priority. The graph priority determines the order in which General Graph draws the graphs: a graph with a higher priority value is drawn later that a graph with a lower priority value. The default is 1.
A text box in which to type the symbol or text input positioned at data points in a scatter graph. The default is the plus sign (+).
A text box in which to type the name to be used in the legend for the current graph. The default is, simply, Graph. The specified name is reflected in the Legend control set See Legend
The legend reflects the value set for the Graph Name control in the Graph control set. The Legend controls, which set attribute values for the legend displayed for the current graph, include the following: line style
An option menu from which to select the style of lines in the current graph. You can specify the value of this attribute as an array that describes the shape of the line, or you can choose it from the menu. The options are:
An option menu from which to select the color of lines in the current graph. The options include standard color names such as red (the default), yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background or antibackground.
Axis Controls
The Axis controls, which set attribute values for the current graph's T and G axes, include the following:
A set of radio buttons with which to specify the current axis : the axis in the current graph whose attribute values you want to set. Which controls are displayed vary depending on the axis selected. The default is RAxis.
A text box in which to specify where the current axis crosses the other axis. The exact meaning of the contents of this text box, as well as its label, vary depending on the current axis, as follows:
A slider/text box combination with which to specify the width in points of the current axle. You can either move the slider to the desired value or type in the value. The default is 1.00 points.
An option menu from which to select the color of the current axle. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background or antibackground (the default).
A slider/text box combination with which to specify the height in points of the label text for the current axis. You can either move the slider to the desired value or type in the value. The default is 5.00 points.
An option menu from which to select the color of the label text for the current axis. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined reference color settings such as background or antibackground (the default).
A text box in which to type the label text for the current axis. The default is, simply, R axis text or Taxis text (as appropriate).
A slider/text box combination with which to specify the height in points of the label for the current axis. You can either move the slider to the desired value or type in the value. The default is 5.00 points.
An option menu from which to select the color of the label for the current axis. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined reference color settings such as background or antibackground (the default).
A slider with which to specify the number of places after the decimal point in the label for the current axis. The default is 0.
The number of decimal places actually used will be less than or equal to the value that you specify with this control.
A text box in which to type an integer value that specifies the number of major tick marks to use along the current axis. By default, this control is unset.
A text box in which to type an integer value that specifies the number of minor tick marks to use between major tick marks along the current axis. The default value is 2.
An option menu from which to select the style of major tick marks on the current axis. You can specify the value of this attribute as an array that describes the shape of the tick mark, or you can choose it from the menu. The options are:
An option menu from which to select the color of major tick marks on the current axis. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background or antibackground (the default).
An option menu from which to select the style of minor tick marks on the current axis. You can specify the value of this attribute as an array that describes the shape of the tick mark, or you can choose it from the menu. The options are:
An option menu from which to select the color of minor tick marks on the current axis. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background or antibackground (the default).
Viewport controls.
The Viewport controls, which set attribute values for the viewport defined for the current graph in the viewer window, include the following:
A check box that specifies whether to display a frame for the current graph's viewport. The settings are:
A slider/text box combination with which to specify the width in points of the line used to draw the frame for the current graph's viewport. You can either move the slider to the desired value or type in the value. The default is 0.01 points.
An option menu from which to select the color of the frame for the current graph's viewport. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background or antibackground (the default).
An option menu from which to select the background color for the current graph's viewport. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background (the default) or antibackground.
Legend controls.
The legend reflects the value set for the Graph Name control in the Graph control set ( See Graph Name ). The Legend controls, which set attribute values for the legend displayed for the current graph, include the following:
A text box in which to type the X coordinate of the upper left corner of the current graph's legend. The default value is 5.50.
A text box in which to type the Y coordinate of the upper (left? right?) corner of the current graph's legend. The default value is -3.00.
An option menu from which to select the background color for the current graph's legend. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background (the default) or antibackground.
An option menu from which to select the color of the frame for the current graph's legend. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined color settings such as background or antibackground (the default).
A slider/text box combination with which to specify the width in points of the line used to draw the frame for the current graph's legend. You can either move the slider to the desired value or type in the value. The default is 0.10 points.
A slider/text box combination with which to specify the height in points of the label for the current graph's legend. You can either move the slider to the desired value or type in the value. The default is 2.00 points.
A text box in which to type the number of columns in the current graph's legend. In the case of multiple graph inputs, specify 1 (the default) to arrange all of the legends in a vertical line.
An option menu from which to select the color of the label for the current graph's legend. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined reference color settings such as background or antibackground (the default).
A text box in which to type the title for the current graph's legend. The default is, simply, Title.
A slider/text box combination with which to specify the height in points of the title for the current graph's legend. You can either move the slider to the desired value or type in the value. The default is 4.00 points.
An option menu from which to select the color of the title for the current graph's legend. The options include standard color names such as red, yellow, magenta, cyan, black, white, or gray, or predefined reference color settings such as background or antibackground (the default).
Output Port
Example
This example uses the data from floating-point arrays to construct two graphs. The T data is input to port 1 (the leftmost port) and the R data is input to ports 2 and 3.
File
See Also Related Modules