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
valuesX[] float[]
valuesY1[] float[]
valuesY2[] float[]
valuesY3[] float[]
valuesY4[] float[]
valuesY5[] float[]
parent
User Interface Controls
object UIoptionMenu
User Interface Controls
object UIoptionMenu
Graph controls:
Graph1 UIradioBox
Graph2 UIradioBox
Graph3 UIradioBox
Graph4 UIradioBox
Graph5 UIradioBox
Graph On/Off UItoggle
Graph priority UIfield
graphtype UIradioButton
Bar width UIfield
Line width UIfield
Scatter symbol UItext
Scatter size UIfield
Graph Name UItext
line style UIoptionMenu
line color UIoptionMenu
Axis controls:
RAxis UIradioBox
TAxis UIradioBox
Axle on/off UItoggle
T Axis crossing position UIfield
R Axis crossing position UIfield
Axle width UIslider, UIfield
Axle color UIoptionMenu
reverse text alignment UItoggle
Text height UIslider, UIfield
Text color UIoptionMenu
R Axis Text UItext
T Axis Text UItext
Label height UIslider, UIfield
Label color UIoptionMenu
Label Decimals UIslider
R Tickline on/off UItoggle
T Tickline on/off UItoggle
Steps for Major tick marks UIfield
Steps for Minor tick marks UIfield
Major tick style UIoptionMenu
Major tick color UIoptionMenu
Minor tick style UIoptionMenu
Minor tick color UIoptionMenu
World controls:
T region min UIfield
T region max UIfield
R region min UIfield
R region max UIfield
Viewport controls:
Frame visible UItoggle
Frame Width UIslider, UIfield
Frame Color UIoptionMenu
Fill Color UIoptionMenu
Legend controls:
Legend On/Off UItoggle
Legend X position UIfield
Legend Y position UIfield
FillColor UIoptionMenu
FrameColor UIoptionMenu
Frame Width UIslider, UIfield
Label Height UIslider, UIfield
Number of Columns UIfield
Label Color UIoptionMenu
Title UItext
Title Height UIslider, UIfield
Title Color UIoptionMenu
Output Ports
out_obj
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.
Input Ports
valuesT
(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.
parent
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
valuesT
(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.
parent
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
Object
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 (the default): Display the Graph controls.
Axis: Display the Axis controls.
World: Display the World controls.
Viewport: Display the Viewport controls.
Legend: Display the Legend controls.
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.
Graph On/Off
A check box that specifies whether to display the current graph. The settings are:
Checked (the default): Display the graph.
Unchecked: Do not display the graph.
Graph priority
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.
Graphtype
A set of radio buttons with which to specify the type of the current graph. The choices are:
Line width
A text box in which to type the width of the line.
This control is valid only when the current graph type is curve or line.
Scatter symbol
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 (+).
This control is valid only when the current graph type is scatter.
Scatter size
A text box in which to type the point size of the scatter symbol. The default is 10.0 points.
This control is valid only when the current graph type is scatter.
Graph Name
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
controls.
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:
line color
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:
RAxis, TAxis
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.
Axle on/off
A check box that specifies whether to display the current axis. The settings are:
Checked (the default): Display the axis.
Unchecked: Do not display the axis.
T Axis crossing position
R Axis crossing position
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:
Current Axis
|
Control Value Meaning
|
Text Box Label
|
R axis
|
The point on the T axis at which the R axis crosses
|
T Axis crossing position
|
T axis
|
The point on the R axis at which the T axis crosses
|
R Axis crossing position
|
Axle width
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.
Axle color
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).
reverse text alignment
A check box that specifies where to display the label for the current axis. The settings are:
Checked: Display the label on the reverse (nonstandard) side.
Unchecked (the default): Display the label on the standard side.
Text height
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.
Text color
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).
R Axis Text
T Axis Text
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).
The label for this text box varies depending on the current axis.
Label height
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.
Label color
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).
Label Decimals
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.
R Tickline on/off
T Tickline on/off
A check box that specifies whether to display the tickline for the current axis. The settings are:
Checked (the default): Display the tickline.
Unchecked: Do not display the tickline.
The label for this text box varies depending on the current axis.
Steps for Major tick marks
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.
Steps for Minor tick marks
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.
Major tick style
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:
Major tick color
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).
Minor tick style
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:
Minor tick color
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).
T region min
A text box in which to type the minimum T value to be displayed.
T region max
A text box in which to type the maximum T value to be displayed.
R region min
A text box in which to type the minimum R value to be displayed.
R region max
A text box in which to type the maximum R value to be displayed.
Viewport controls.
The Viewport controls, which set attribute values for the viewport defined for the current graph in the viewer window, include the following:
Frame visible
A check box that specifies whether to display a frame for the current graph's viewport. The settings are:
Checked (the default): Display a frame.
Unchecked: Do not display a frame.
Frame Width
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.
Frame Color
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).
Fill Color
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:
Legend On/Off
A check box that specifies whether to display a legend for the current graph. The settings are:
Checked (the default): Display a legend.
Unchecked: Do not display a legend.
Legend X position
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.
Legend Y position
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.
FillColor
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.
Frame Color
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).
Frame Width
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.
Label Height
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.
Number of Columns
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.
Label Color
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).
Title
A text box in which to type the title for the current graph's legend. The default is, simply, Title.
Title Height
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.
Title Color
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
out_obj
A renderable version of the resulting graphs.
Example
mpolar.v
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
v/aghlm.v
See Also Related Modules