ParetoX is used for displaying error distributions in Scorpion.
You configure titles, font sizes and colors using the property page or
code. Data is added using
code only. A SpbXml property ensures that Scorpion will save all
added data when Scorpion terminates.
If this is undesirable you will have to explicitly reset the data using
code when Scorpion loads.
Assuming the name of the instance of the Pareto ActiveX is ParetoX1,
this python code will update the graph as indicated:
Example 1: Python Central Syntax
colRed=255
ParetoX1.SetValue('Name=Edge;Value=1;Color='+colRed)
ParetoX1.SetValue('Name=Angle;Value=2;Color='+colRed)
ParetoX1.SetValue('Name=New Value=1;Color='+colRed)
Python wrapper for ParetoX
The Pareto profile demonstrates access to the ParetoX activeX through
the Python wrapper pareto located in the pareto.py file.
The Pareto profile is located on the Scorpion CD - Unsupported
Profiles.
Example 2: Instantiating the Pareto Class
# normally located in Central Start
import pareto
myPareto=pareto.Pareto(PluginPanel1) # the paretoX is located in the
Scorpion PluginPanel 1
Example 3: Counting the number of samples in the Pareto Graph
# retrieve all values from ParetoX
vd=myPareto.ValuesAsPyDict()
n=0
for it in vd:
n+=vd[it]
# set BottomAxis Total
myPareto.BottomAxis.Caption('Total=%d' % int(n))
|