# SmithChart

A 2D Smith chart 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

-- Export an image

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


## Inheritance

The SmithChart object is derived from the Graph object.

## 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)
Grid
The Smith chart grid properties. (Read only SmithChartGrid)
GridType
The Smith chart grid type. (Read/Write GridTypeEnum)
Height
The height of the window. (Read only number)
Legend
The graph legend properties. (Read only GraphLegend)
ReactanceAxisFont
The Smith chart reactance axis font style. (Read only FontFormat)
ResistanceAxisFont
The Smith chart resistance axis font style. (Read only FontFormat)
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

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.)
DuplicateAsCartesian ()
Creates a Cartesian graph with the same data as the Smith chart. (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

BackColour
The background colour of the graph.
Type
Colour
Access
Footer
The graph footer properties.
Type
TextBox
Access
GreyscaleEnabled
Set the graph's colour scheme to greyscale.
Type
boolean
Access
Grid
The Smith chart grid properties.
Type
SmithChartGrid
Access
GridType
The Smith chart grid type.
Type
GridTypeEnum
Access
Height
The height of the window.
Type
number
Access
Legend
The graph legend properties.
Type
GraphLegend
Access
ReactanceAxisFont
The Smith chart reactance axis font style.
Type
FontFormat
Access
ResistanceAxisFont
The Smith chart resistance axis font style.
Type
FontFormat
Access
Title
The graph title properties.
Type
TextBox
Access
Type
The object type string.
Type
string
Access
Width
The width of the window.
Type
number
Access
WindowActive
True if this window is the active window.
Type
boolean
Access
WindowTitle
The title of the window.
Type
string
Access
XPosition
The X position of the window.
Type
number
Access
YPosition
The Y position of the window.
Type
number
Access

## 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

AddChartImage (view View, posX number, posY number)
Add a 3D view image to this 2D Graph.
Input Parameters
view(View)
The 3D view.
posX(number)
The x-position of the added chart image.
posY(number)
The y-position of the added chart image.
AddChartImageFromFile (file string, posX number, posY number)
Add an image file to this 2D Graph.
Input Parameters
file(string)
The file.
posX(number)
The x-position of the added chart image.
posY(number)
The y-position of the added chart image.
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 Smith chart.
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.