Graph
A 2D graph where results can be plotted.
Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]]) -- Add a Cartesian graph and a trace graph = app.CartesianGraphs:Add() excitation = app.Models["startup"].Configurations[1].Excitations[1] excitationTrace = graph.Traces:Add(excitation) -- Change properties of the graph graph.BackColour = pf.Enums.ColourEnum.LightGrey graph.Grid.Minor.Visible = true graph.Grid.Border.Weight = 2
Inheritance
The Graph object is derived from the Window object.
The following objects are derived (specialisations) from the Graph object:
Usage locations
The Graph object can be accessed from the following locations:
- Methods
- SmithChart object has method Duplicate().
- PolarGraph object has method Duplicate().
- CartesianGraph object has method Duplicate().
- Graph object has method Duplicate().
Property List
- BackColour
- The background colour of the graph. (Read/Write Colour)
- Footer
- The graph footer properties. (Read only TextBox)
- GreyscaleEnabled
- Set the graph's colour scheme to greyscale. (Read/Write boolean)
- Height
- The height of the window. (Read only number)
- Legend
- The graph legend properties. (Read only GraphLegend)
- Title
- The graph title properties. (Read only TextBox)
- 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
- AddChartImage (view View, posX number, posY number)
- Add a 3D view image to this 2D Graph.
- AddChartImageFromFile (file string, posX number, posY number)
- Add an image file to this 2D Graph.
- 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.)
- 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.
- 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.
- 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
- BackColour
- The background colour of the graph.
- Type
- Colour
- Access
- Read/Write
- The graph footer properties.
- Type
- TextBox
- Access
- Read only
- GreyscaleEnabled
- Set the graph's colour scheme to greyscale.
- Type
- boolean
- Access
- Read/Write
- Height
- The height of the window.
- Type
- number
- Access
- Read only
- Legend
- The graph legend properties.
- Type
- GraphLegend
- Access
- Read only
- Title
- The graph title properties.
- Type
- TextBox
- 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.
- Shapes
- The collection of 2D shapes on the graph.
- Traces
- The collection of 2D traces on the graph.
Method Details
- AddChartImage (view View, posX number, posY number)
- Add a 3D view image to this 2D Graph.
- AddChartImageFromFile (file string, posX number, posY number)
- Add an image file to this 2D Graph.
- 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.
- 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.
- 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.
- 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.