Output Channels

Graph Frame

class mhrc.automation.graph_frame.GraphFrame(canvas, *iid)

This class is responsible for interacting with a PSCAD Graph Frame.

The Graph Frame object must be retrieved from a PSCAD Project using the ProjectCommands.graph_frame() method (or equivalent).

prj = pscad.project('vdiv')
graph_frame = prj.graph_frame('Main', 653718116)


The Graph Frame parameters holds two sets of properties. The first set of properties is the properties for the frame itself.

Graph Frame Properties
Param Name Type Description
title str Caption of Graph Frame
markers bool Show Markers
glyphs bool Show Glyphs
ticks bool Show Ticks (obsolete)
grid bool Show Grid
yinter bool Show Y-Intercept
xinter bool Show X-Intercept
Pan str “Auto-Pan X-Axis”: a string containing an enable flag (true/false), a comma, and the pan percentage as an integer.

The second set of properties is for the horizontal axis.

Horizontal Axis Properties
Param Name Type Description
XLabel str Title
snapaperture bool Snap Aperture to the Grid
dynaperture bool Dynamic Time Aperture Adjustment
minorgrids bool Enable Minor Grids
markers bool Show Markers
lockmarkers bool Lock Markers
deltareadout bool Show Delta Readout
xmarker float X-Marker position
omarker float Y-Marker position
GraphFrame.set_parameters(scenario=None, **kwargs)

Set the parameters of a graph frame and/or its horizontal axis.

  • scenario (str) – Name of scenario to set parameters for. (optional)
  • **kwargs – One or more name=value keyword parameters

Get the parameters of a graph frame and its horiztonal axis.

Parameters:scenario (str) – Name of scenario to get parameters from. (optional)
Returns:A dictionary of property name=value pairs.



Reset graph frame X-Axis to the extents of the data


Reset the Y-Axis for all graphs individually to the extents of the data in each plot.



Retrieve a controller for on overlay graph in a graph frame.

Parameters:iid (int) – The id attribute of the overlay graph.
Returns:An overlay graph controller proxy object.

Overlay Graph

class mhrc.automation.overlay_graph.OverlayGraph(canvas, *iid)

Overlay Graph Command Object


OverlayGraph.set_zoom(xmin=None, xmax=None, ymin=None, ymax=None)

Set the horizontal and vertical limits of the overlay graph.

  • xmin (float) – Lower X-Axis limit
  • xmax (float) – Upper X-Axis limit
  • ymin (float) – Lower Y-Axis limit
  • ymax (float) – Upper Y-Axis limit