The VectorPlotColorComponent option changes the component being used for the scalar color for the VectorPlot. The OptionValue is an integer number, representing the component.
Syntax
object.Construct(“CreateModule”)
object.Option(“SourceModule”, “data file name”)
object.Option(“Type”, “VectorPlot”)
object.Do() or object.DoOnce()
object.Construct(“ModifyModule”)
object.Option(“Module”, “VectorPlot”)
object.Option(“VectorPlotColorComponent”, “OptionValue”)
object.Do() or object.DoOnce()
Example
This example attaches a scalar import file to the vector plot, changes the VectorPlotColorMethod to Scalar, and changes the color component to 1.
'Connect the VectorPlot and TestLattice as the scalar import
CommandApi.Construct("ConnectModules")
CommandApi.Option ("SourceModule", "TestLattice")
CommandApi.Option ("TargetModule","VectorPlot")
CommandApi.Option ("TargetPort", "1")
CommandApi.Do()
'Change the Color Method to Scalar
CommandApi.Construct("ModifyModule")
CommandApi.Option ("Module", "VectorPlot")
CommandApi.Option ("VectorPlotColorMethod","2")
CommandApi.Do()
'Change the component being shown in the vector plot
CommandApi.Construct("ModifyModule")
CommandApi.Option ("Module", "VectorPlot")
CommandApi.Option ("VectorPlotColorComponent","1")
CommandApi.Do()
Used by: VectorPlot module
See Also