PolarGraph

A 2D Polar graph where results can be plotted.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])

    -- Create a graph with a trace 
    
graph = app.PolarGraphs:Add()
farFieldTrace = graph.Traces:Add(app.Models[1].Configurations[1].FarFields[1])

    -- Export an image 

graph:ExportImage("temp_FarFieldGraph", "pdf")

Inheritance

The PolarGraph object is derived from the Graph object.

Property List

AngularAxis
The polar graph angular axis properties. (Read only AngularGraphAxis)
BackColour
The background colour of the graph. (Read/Write Colour)
Direction
The polar graph direction specified by the PolarGraphDirectionEnum, e.g. Clockwise and Anticlockwise. (Read/Write PolarGraphDirectionEnum)
Footer
The graph footer properties. (Read only TextBox)
GreyscaleEnabled
Set the graph's colour scheme to greyscale. (Read/Write boolean)
Grid
The polar graph grid properties. (Read only PolarGraphGrid)
Height
The height of the window. (Read only number)
Legend
The graph legend properties. (Read only GraphLegend)
Normalisation
The polar radial axis normalisation properties. (Read only Normalisation)
Orientation
The polar graph orientation specified by the PolarGraphOrientationEnum, e.g. ZeroAtTop, ZeroAtRight, etc. (Read/Write PolarGraphOrientationEnum)
RadialAxis
The polar graph radial axis properties. (Read only RadialGraphAxis)
Title
The graph title properties. (Read only TextBox)
Type
The object type string. (Read only string)
Width
The width of the window. (Read only number)
WindowActive
True if this window is the active window. (Read only boolean)
WindowTitle
The title of the window. (Read/Write string)
XPosition
The X position of the window. (Read only number)
YPosition
The Y position of the window. (Read only number)

Collection List

Arrows
The collection of 2D arrows on the graph. (ResultArrowCollection of ResultArrow.)
Shapes
The collection of 2D shapes on the graph. (ResultTextBoxCollection of ResultTextBox.)
Traces
The collection of 2D traces on the graph. (ResultTraceCollection of ResultTrace.)

Method List

AddMathTrace ()
Adds a math trace to the 2D graph. (Returns a MathTrace object.)
BlockGraphRedraws ()
Disables graph redraws for performance purposes. When all the changes to the graph are complete, call UnblockGraphRedraws to re-enable graph updates.
Close ()
Close the window.
Duplicate ()
Duplicate the 2D graph. (Returns a Graph object.)
DuplicateAsCartesian ()
Creates a Cartesian graph with the same data as the polar graph. (Returns a CartesianGraph object.)
ExportImage (filename string, fileformat string)
Export the window image at its same size to a specified file.
ExportImage (filename string, fileformat string, imagewidth number, imageheight number)
Export the window image at the given size to a specified file.
ExportTraces (filename string, samples number)
Export the graph traces to the specified tab separated file.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
Maximise ()
Maximise the window.
Minimise ()
Minimise the window.
Restore ()
Restore the window.
SetPosition (xposition number, yposition number)
Sets the view position. Note that the view is restored when this function is called.
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
SetSize (imagewidth number, imageheight number)
Sets the view size. Note that the view is restored when this function is called.
Show ()
Shows the view.
UnblockGraphRedraws ()
Enables graph redraws. This method is used in conjunction with BlockGraphRedraws for performance purposes. The graph is redrawn when this method is called and normals redraws will occur on changes.
ZoomToExtents ()
Zoom the content of the window to its extent.

Property Details

AngularAxis
The polar graph angular axis properties.
Type
AngularGraphAxis
Access
Read only
BackColour
The background colour of the graph.
Type
Colour
Access
Read/Write
Direction
The polar graph direction specified by the PolarGraphDirectionEnum, e.g. Clockwise and Anticlockwise.
Type
PolarGraphDirectionEnum
Access
Read/Write
Footer
The graph footer properties.
Type
TextBox
Access
Read only
GreyscaleEnabled
Set the graph's colour scheme to greyscale.
Type
boolean
Access
Read/Write
Grid
The polar graph grid properties.
Type
PolarGraphGrid
Access
Read only
Height
The height of the window.
Type
number
Access
Read only
Legend
The graph legend properties.
Type
GraphLegend
Access
Read only
Normalisation
The polar radial axis normalisation properties.
Type
Normalisation
Access
Read only
Orientation
The polar graph orientation specified by the PolarGraphOrientationEnum, e.g. ZeroAtTop, ZeroAtRight, etc.
Type
PolarGraphOrientationEnum
Access
Read/Write
RadialAxis
The polar graph radial axis properties.
Type
RadialGraphAxis
Access
Read only
Title
The graph title properties.
Type
TextBox
Access
Read only
Type
The object type string.
Type
string
Access
Read only
Width
The width of the window.
Type
number
Access
Read only
WindowActive
True if this window is the active window.
Type
boolean
Access
Read only
WindowTitle
The title of the window.
Type
string
Access
Read/Write
XPosition
The X position of the window.
Type
number
Access
Read only
YPosition
The Y position of the window.
Type
number
Access
Read only

Collection Details

Arrows
The collection of 2D arrows on the graph.
Type
ResultArrowCollection
Shapes
The collection of 2D shapes on the graph.
Type
ResultTextBoxCollection
Traces
The collection of 2D traces on the graph.
Type
ResultTraceCollection

Method Details

AddMathTrace ()
Adds a math trace to the 2D graph.
Return
MathTrace
The math trace.
BlockGraphRedraws ()
Disables graph redraws for performance purposes. When all the changes to the graph are complete, call UnblockGraphRedraws to re-enable graph updates.
Close ()
Close the window.
Duplicate ()
Duplicate the 2D graph.
Return
Graph
The duplicated 2D graph.
DuplicateAsCartesian ()
Creates a Cartesian graph with the same data as the polar graph.
Return
CartesianGraph
The copied Cartesian graph.
ExportImage (filename string, fileformat string)
Export the window image at its same size to a specified file.
Input Parameters
filename(string)
The name of the image file without its extension.
fileformat(string)
The image file format, e.g. jpg, png, pdf, etc.
ExportImage (filename string, fileformat string, imagewidth number, imageheight number)
Export the window image at the given size to a specified file.
Input Parameters
filename(string)
The name of the image file without its extension.
fileformat(string)
The image file format, e.g. jpg, png, pdf, etc.
imagewidth(number)
The export width in pixels.
imageheight(number)
The export height in pixels.
ExportTraces (filename string, samples number)
Export the graph traces to the specified tab separated file.
Input Parameters
filename(string)
The name of the exported data file without its extension.
samples(number)
The number of samples for continuous data. This value will be ignored if the first trace on the graph is discrete.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A properties table.
Maximise ()
Maximise the window.
Minimise ()
Minimise the window.
Restore ()
Restore the window.
SetPosition (xposition number, yposition number)
Sets the view position. Note that the view is restored when this function is called.
Input Parameters
xposition(number)
The view X position.
yposition(number)
The view Y position.
SetProperties (properties table)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(table)
A table of properties defining the new state of the object.
SetSize (imagewidth number, imageheight number)
Sets the view size. Note that the view is restored when this function is called.
Input Parameters
imagewidth(number)
The view width in pixels.
imageheight(number)
The view height in pixels.
Show ()
Shows the view.
UnblockGraphRedraws ()
Enables graph redraws. This method is used in conjunction with BlockGraphRedraws for performance purposes. The graph is redrawn when this method is called and normals redraws will occur on changes.
ZoomToExtents ()
Zoom the content of the window to its extent.