A wxPython and Matplotlib based simulation results plotter (PyOPUS subsystem name: WxMplPL)
This plotter takes the simulation results from a PerformanceEvaluator object.
Because this plotter depends on wxPython and Matplotlib it is not imported into the main PyOPUS module.
The plot windows and their contents are described by a dictionary with the following keys:
The value of graphs is a dictionary with graph name for key. The value for every key is a dictionary describing a graph with the following members:
title - the title of the canvas displaying the graph
shape - a dictionary specifying the size of the plot window. It has the following members:
If both figsize and figpx are given, figpx takes precedence over figsize.
If figpx is specified dpi is used for calculating the size of the figure in inches (used when a plot window is saved to a Postscript file).
If figpx is not specified, dpi is used for convertion figsize to pixels. The obtained values specify the size of the plot window’s canvas.
If dpi is not specified the default Matplotlib value is used.
The contents of the shape dictionary are passed to the constructor of the PlotFrame object that corresponds to the plot window.
axes - a dictionary with axes name for key decribing the axes that reside in the plot window
Every value in the axes dictionary describes one axes of the plot window. It is itself a dictionary with the following members:
If both rectangle and subplot are specified, rectangle is used.
Axis scale type (xscale and yscale) is a dictionary with the following members:
See the Axes.set_xscale() and Axes.set_yscale() methods in Matplotlib for more information.
The value of styles is a list of dictionaries. Every dictionary specifyes a style with the following dictionary members:
A trace style is determined by starting with no style directives. The styles list is traveversed and a style specified by the style member is applied if the pattern matches the graph, axes, corner, and trace name.
Style directives that appear later in the list override those that appear earlier. The final trace style is obtained by applying the style specified in the trace definition. This style overrides the style directives obtained with matching patterns from the styles list.
The traces member is a dictionary with trace name for key. Values are dictionaries with the following members:
A class that plots the peformance measures from the perforamnceEvaluator object.
The way these measures are plotted is specified by setup.
If debug is greater than 0 debug messages are printed at standard output.
Objects of this class are callable with the following calling convention:
object(prefixText='', postfixText='', createPlots=True)
The title of every plot windows is the plot window name.
The title of every canvas is composed of prefixText, plot window title, and postfixText.
The createPlots is True the plot windows are created if they do not exist. If a plot window does not exist and it is not created then the traces that are supposed to be displayed by that plot window are not plotted.
If initializePlotting is True the plotting system is initialized (graphical thread is started) automatically when needed.
Returns the performance evaluator object specified when the plotter’s constructor was called.