Graphs

Frames

Graph Frame

class mhi.enerplot.GraphFrame

Graph Frame

A container which can hold one or more Graph Panels, stacked vertically, with a common x-axis.

add_overlay_graph()

Add a new overly graph panel to the Graph Frame.

Returns:the newly added graph panel.
Return type:GraphPanel
add_poly_graph()

Add a new poly-graph panel to the Graph Frame.

Returns:the newly added graph panel.
Return type:GraphPanel
remove(*graphs)

Remove graphs from the Graph Frame

attributes(**kwargs)

Set or get a component’s attributes

A component’s attributes are used to describe the component’s location and size relative to its parent.

Parameters:**kwargs – key=value arguments
Returns:The component’s current attributes.
Return type:dict

See also

properties()

book

The book the component belongs to (read-only)

book_name

The book the component belongs to (read-only)

classid

The classid of the component (read-only)

copy()

Copy the component to the clipboard

copy_as_bitmap()

Copy component to clipboard as a bitmap

copy_as_metafile()

Copy component to clipboard as a metafile

cut()

Remove the component to the clipboard

extents(x=None, y=None, width=None, height=None)

Get or set the component’s position and size

If all parameters are given, the position and size is set. If all parameters are omitted, the current extents are returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current extents of the component

Return type:

Tuple[x,y,width,height]

find([classid,] [key=value, ...])

Find the (singular) component that matches the given criteria, or None if no matching component can be found. Raises an exception if more than one component matches the given criteria.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

find_all([classid,] [key=value, ...])

Find all components that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the list of matching components

Return type:

List[Component]

find_first([classid,] [key=value, ...])

Find a component that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

id

The id of the component (read-only)

list(classid=None)

List all the components contained inside this object, possibly restricted to a certain classid.

Parameters:classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
Returns:the list of components
Return type:List[Component]
lock_markers(lock=True, *, delta=None)

Lock (or unlock) markers to a fixed offset from each other.

Parameters:
  • lock (bool) – set to False to unlock the marker
  • delta (float) – used to specify lock offset (optional)

Examples:

fft.lock_markers()
fft.lock_markers(delta=1/50)
fft.lock_markers(False)
main

A reference to the Application object that returned this Remotable object.

parent()

Retrieve the owner of this component

paste()

Paste the component(s) from the clipboard to this canvas

position(x=None, y=None)

Get or set the component’s position.

If the x & y parameters are given, the position is set. If they are omitted, the current position is returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
Returns:

The current location of the component

Return type:

Tuple[x,y]

properties(paramlist='', **kwargs)

Set or get a component’s properties

A component’s properties are used to describe the component’s appearance or control the component’s behaviour.

Parameters:**kwargs – key=value arguments
Returns:The component’s current property values
Return type:dict

See also

attributes()

reset_extents()

Reset the graph’s extents

reset_limits()

Reset the graph’s limits

set_markers(x=None, o=None, *, delta=None)

Set the X and/or O marker positions.

If both x and o are specified, delta cannot be given.

If delta is given, the O-marker is positioned the specified distance after the X-marker, unless the o value is specified in which case the X-marker is positioned the specified distance before the O-marker.

If the markers were hidden, they will automatically be shown.

If the markers are “locked together”, they will remain locked together, but with their relative offset defined by their new positions.

Parameters:
  • x (float) – new x-marker position
  • o (float) – new o-marker position
  • delta (float) – distance between x & o markers

Examples

The following are equivalent, and set the markers 1 cycle apart, assuming a 60Hz waveform:

graph_frame.set_markers(0.1, 0.11666667)
graph_frame.set_markers(0.1, delta=0.01666667)
graph_frame.set_markers(0.1, delta=1/60)
graph_frame.set_markers(delta=1/60, x=0.1)
graph_frame.set_markers(delta=1/60, o=0.11666667)
show_glyphs(show=True)

Set the curve glyph visibility.

Parameters:show (bool) – Set to False to turn off the curve glyphs.
show_grid(show=True)

Set the grid’s visibility.

Parameters:show (bool) – Set to False to turn off the grid.
show_markers(show=True)

Show (or hide) the X/O markers

show_ticks(show=True)

Set the tick visibility.

Parameters:show (bool) – Set to False to turn off the tick markers.
show_x_intercept(show=True)

Set the X intercept visibility on or off

show_y_intercept(show=True)

Set the Y intercept visibility on or off

size(width=None, height=None)

Get or set the component’s size

If the width & height parameters are given, the size is set. If they are omitted, the current size is returned.

Parameters:
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current size of the component

Return type:

Tuple[width, height]

title

The title of the frame

toggle_curve_glyphs()

Toggle curve glyphs on or off

toggle_grid_lines()

Toggle grid lines on or off

toggle_markers()

Toggle X/O markers

toggle_tick_marks()

Toggle tick marks on or off

toggle_x_intercept()

Toggle X intercept on or off

toggle_y_intercept()

Toggle Y intercept on or off

zoom(xmin=None, xmax=None, ymin=None, ymax=None, *, compute_x_grid=True, compute_y_grid=True)

Alter the graph’s viewport

zoom_extents(x_extents=True, y_extents=True)

Reset the graph’s zoom to the X and/or Y extents. By default, both X and Y axis zoom is affected.

Parameters:
  • x_extents (bool) – set to False to not affect X-axis
  • y_extents (bool) – set to False to not affect Y-axis
zoom_limits(x_limits=True, y_limits=True)

Reset the graph’s zoom to the X and/or Y limits. By default, both X and Y axis zoom is affected.

Parameters:
  • x_limits (bool) – set to False to not affect X-axis
  • y_limits (bool) – set to False to not affect Y-axis
zoom_x_extents()

Reset the graph’s zoom for the X-axis to the X extents.

zoom_x_limits()

Reset the graph’s zoom for the X-axis to the X limits.

zoom_y_extents()

Reset the graph’s zoom for the Y-axis to the Y extents.

zoom_y_limits()

Reset the graph’s zoom for the Y-axis to the Y limits.

Plot Frame

class mhi.enerplot.PlotFrame

Plot Frame

A container which holds a X-Y plot graph containing 1 or more curves.

add_curves(*channels)

Add one or more channels to the X-Y plot.

For every pair of channels added, one X-Y curve is created.

Parameters:*channels (Channel) – curves to add to X-Y plot frame
paste_curve()

Paste a curve from the clipboard into the graph

polar()

Switch the plot to Polar mode (magnitude & phase)

rectangular()

Switch the plot to Rectangular mode (X-Y)

attributes(**kwargs)

Set or get a component’s attributes

A component’s attributes are used to describe the component’s location and size relative to its parent.

Parameters:**kwargs – key=value arguments
Returns:The component’s current attributes.
Return type:dict

See also

properties()

book

The book the component belongs to (read-only)

book_name

The book the component belongs to (read-only)

classid

The classid of the component (read-only)

copy()

Copy the component to the clipboard

copy_as_bitmap()

Copy component to clipboard as a bitmap

copy_as_metafile()

Copy component to clipboard as a metafile

cut()

Remove the component to the clipboard

extents(x=None, y=None, width=None, height=None)

Get or set the component’s position and size

If all parameters are given, the position and size is set. If all parameters are omitted, the current extents are returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current extents of the component

Return type:

Tuple[x,y,width,height]

find([classid,] [key=value, ...])

Find the (singular) component that matches the given criteria, or None if no matching component can be found. Raises an exception if more than one component matches the given criteria.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

find_all([classid,] [key=value, ...])

Find all components that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the list of matching components

Return type:

List[Component]

find_first([classid,] [key=value, ...])

Find a component that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

id

The id of the component (read-only)

list(classid=None)

List all the components contained inside this object, possibly restricted to a certain classid.

Parameters:classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
Returns:the list of components
Return type:List[Component]
main

A reference to the Application object that returned this Remotable object.

parent()

Retrieve the owner of this component

paste()

Paste the component(s) from the clipboard to this canvas

position(x=None, y=None)

Get or set the component’s position.

If the x & y parameters are given, the position is set. If they are omitted, the current position is returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
Returns:

The current location of the component

Return type:

Tuple[x,y]

properties(paramlist='', **kwargs)

Set or get a component’s properties

A component’s properties are used to describe the component’s appearance or control the component’s behaviour.

Parameters:**kwargs – key=value arguments
Returns:The component’s current property values
Return type:dict

See also

attributes()

reset_extents()

Reset the graph’s extents

reset_limits()

Reset the graph’s limits

show_glyphs(show=True)

Set the curve glyph visibility.

Parameters:show (bool) – Set to False to turn off the curve glyphs.
show_grid(show=True)

Set the grid’s visibility.

Parameters:show (bool) – Set to False to turn off the grid.
show_ticks(show=True)

Set the tick visibility.

Parameters:show (bool) – Set to False to turn off the tick markers.
show_x_intercept(show=True)

Set the X intercept visibility on or off

show_y_intercept(show=True)

Set the Y intercept visibility on or off

size(width=None, height=None)

Get or set the component’s size

If the width & height parameters are given, the size is set. If they are omitted, the current size is returned.

Parameters:
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current size of the component

Return type:

Tuple[width, height]

title

The title of the frame

toggle_curve_glyphs()

Toggle curve glyphs on or off

toggle_grid_lines()

Toggle grid lines on or off

toggle_tick_marks()

Toggle tick marks on or off

toggle_x_intercept()

Toggle X intercept on or off

toggle_y_intercept()

Toggle Y intercept on or off

zoom(xmin=None, xmax=None, ymin=None, ymax=None, *, compute_x_grid=True, compute_y_grid=True)

Alter the graph’s viewport

zoom_extents(x_extents=True, y_extents=True)

Reset the graph’s zoom to the X and/or Y extents. By default, both X and Y axis zoom is affected.

Parameters:
  • x_extents (bool) – set to False to not affect X-axis
  • y_extents (bool) – set to False to not affect Y-axis
zoom_limits(x_limits=True, y_limits=True)

Reset the graph’s zoom to the X and/or Y limits. By default, both X and Y axis zoom is affected.

Parameters:
  • x_limits (bool) – set to False to not affect X-axis
  • y_limits (bool) – set to False to not affect Y-axis
zoom_x_extents()

Reset the graph’s zoom for the X-axis to the X extents.

zoom_x_limits()

Reset the graph’s zoom for the X-axis to the X limits.

zoom_y_extents()

Reset the graph’s zoom for the Y-axis to the Y extents.

zoom_y_limits()

Reset the graph’s zoom for the Y-axis to the Y limits.

FFT Graph Frame

class mhi.enerplot.FFTFrame

FFT Graph Frame

A container which holds an overlay graph, as well as a magnitude and phase graph for automatic harmonic analysis of the curve(s) in the overlay graph.

add_curves(*channels)

Add one or more channels to the FFT Graph

Parameters:*channels (Channel) – curves to add to graph
paste_curve()

Paste a curve from the clipboard into the top graph

attributes(**kwargs)

Set or get a component’s attributes

A component’s attributes are used to describe the component’s location and size relative to its parent.

Parameters:**kwargs – key=value arguments
Returns:The component’s current attributes.
Return type:dict

See also

properties()

book

The book the component belongs to (read-only)

book_name

The book the component belongs to (read-only)

classid

The classid of the component (read-only)

copy()

Copy the component to the clipboard

copy_as_bitmap()

Copy component to clipboard as a bitmap

copy_as_metafile()

Copy component to clipboard as a metafile

cut()

Remove the component to the clipboard

extents(x=None, y=None, width=None, height=None)

Get or set the component’s position and size

If all parameters are given, the position and size is set. If all parameters are omitted, the current extents are returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current extents of the component

Return type:

Tuple[x,y,width,height]

find([classid,] [key=value, ...])

Find the (singular) component that matches the given criteria, or None if no matching component can be found. Raises an exception if more than one component matches the given criteria.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

find_all([classid,] [key=value, ...])

Find all components that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the list of matching components

Return type:

List[Component]

find_first([classid,] [key=value, ...])

Find a component that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

id

The id of the component (read-only)

list(classid=None)

List all the components contained inside this object, possibly restricted to a certain classid.

Parameters:classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
Returns:the list of components
Return type:List[Component]
lock_markers(lock=True, *, delta=None)

Lock (or unlock) markers to a fixed offset from each other.

Parameters:
  • lock (bool) – set to False to unlock the marker
  • delta (float) – used to specify lock offset (optional)

Examples:

fft.lock_markers()
fft.lock_markers(delta=1/50)
fft.lock_markers(False)
main

A reference to the Application object that returned this Remotable object.

parent()

Retrieve the owner of this component

paste()

Paste the component(s) from the clipboard to this canvas

position(x=None, y=None)

Get or set the component’s position.

If the x & y parameters are given, the position is set. If they are omitted, the current position is returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
Returns:

The current location of the component

Return type:

Tuple[x,y]

properties(paramlist='', **kwargs)

Set or get a component’s properties

A component’s properties are used to describe the component’s appearance or control the component’s behaviour.

Parameters:**kwargs – key=value arguments
Returns:The component’s current property values
Return type:dict

See also

attributes()

reset_extents()

Reset the graph’s extents

reset_limits()

Reset the graph’s limits

set_markers(x=None, o=None, *, delta=None)

Set the X and/or O marker positions.

If both x and o are specified, delta cannot be given.

If delta is given, the O-marker is positioned the specified distance after the X-marker, unless the o value is specified in which case the X-marker is positioned the specified distance before the O-marker.

If the markers were hidden, they will automatically be shown.

If the markers are “locked together”, they will remain locked together, but with their relative offset defined by their new positions.

Parameters:
  • x (float) – new x-marker position
  • o (float) – new o-marker position
  • delta (float) – distance between x & o markers

Examples

The following are equivalent, and set the markers 1 cycle apart, assuming a 60Hz waveform:

graph_frame.set_markers(0.1, 0.11666667)
graph_frame.set_markers(0.1, delta=0.01666667)
graph_frame.set_markers(0.1, delta=1/60)
graph_frame.set_markers(delta=1/60, x=0.1)
graph_frame.set_markers(delta=1/60, o=0.11666667)
show_glyphs(show=True)

Set the curve glyph visibility.

Parameters:show (bool) – Set to False to turn off the curve glyphs.
show_grid(show=True)

Set the grid’s visibility.

Parameters:show (bool) – Set to False to turn off the grid.
show_markers(show=True)

Show (or hide) the X/O markers

show_ticks(show=True)

Set the tick visibility.

Parameters:show (bool) – Set to False to turn off the tick markers.
show_x_intercept(show=True)

Set the X intercept visibility on or off

show_y_intercept(show=True)

Set the Y intercept visibility on or off

size(width=None, height=None)

Get or set the component’s size

If the width & height parameters are given, the size is set. If they are omitted, the current size is returned.

Parameters:
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current size of the component

Return type:

Tuple[width, height]

title

The title of the frame

toggle_curve_glyphs()

Toggle curve glyphs on or off

toggle_grid_lines()

Toggle grid lines on or off

toggle_markers()

Toggle X/O markers

toggle_tick_marks()

Toggle tick marks on or off

toggle_x_intercept()

Toggle X intercept on or off

toggle_y_intercept()

Toggle Y intercept on or off

zoom(xmin=None, xmax=None, ymin=None, ymax=None, *, compute_x_grid=True, compute_y_grid=True)

Alter the graph’s viewport

zoom_extents(x_extents=True, y_extents=True)

Reset the graph’s zoom to the X and/or Y extents. By default, both X and Y axis zoom is affected.

Parameters:
  • x_extents (bool) – set to False to not affect X-axis
  • y_extents (bool) – set to False to not affect Y-axis
zoom_limits(x_limits=True, y_limits=True)

Reset the graph’s zoom to the X and/or Y limits. By default, both X and Y axis zoom is affected.

Parameters:
  • x_limits (bool) – set to False to not affect X-axis
  • y_limits (bool) – set to False to not affect Y-axis
zoom_x_extents()

Reset the graph’s zoom for the X-axis to the X extents.

zoom_x_limits()

Reset the graph’s zoom for the X-axis to the X limits.

zoom_y_extents()

Reset the graph’s zoom for the Y-axis to the Y extents.

zoom_y_limits()

Reset the graph’s zoom for the Y-axis to the Y limits.

Graph Panel

class mhi.enerplot.GraphPanel

Graph Panel

add_curves(*channels)

Add one or more channels to a graph

Parameters:*channels (Channel) – curves to add to graph
paste_curve()

Paste a curve from the clipboard into the graph

remove(*curves)

Remove curves from the Graph Panel

attributes(**kwargs)

Set or get a component’s attributes

A component’s attributes are used to describe the component’s location and size relative to its parent.

Parameters:**kwargs – key=value arguments
Returns:The component’s current attributes.
Return type:dict

See also

properties()

book

The book the component belongs to (read-only)

book_name

The book the component belongs to (read-only)

classid

The classid of the component (read-only)

copy()

Copy the component to the clipboard

copy_as_bitmap()

Copy component to clipboard as a bitmap

copy_as_metafile()

Copy component to clipboard as a metafile

cut()

Remove the component to the clipboard

extents(x=None, y=None, width=None, height=None)

Get or set the component’s position and size

If all parameters are given, the position and size is set. If all parameters are omitted, the current extents are returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current extents of the component

Return type:

Tuple[x,y,width,height]

find([classid,] [key=value, ...])

Find the (singular) component that matches the given criteria, or None if no matching component can be found. Raises an exception if more than one component matches the given criteria.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

find_all([classid,] [key=value, ...])

Find all components that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the list of matching components

Return type:

List[Component]

find_first([classid,] [key=value, ...])

Find a component that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

id

The id of the component (read-only)

list(classid=None)

List all the components contained inside this object, possibly restricted to a certain classid.

Parameters:classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
Returns:the list of components
Return type:List[Component]
main

A reference to the Application object that returned this Remotable object.

parent()

Retrieve the owner of this component

paste()

Paste the component(s) from the clipboard to this canvas

position(x=None, y=None)

Get or set the component’s position.

If the x & y parameters are given, the position is set. If they are omitted, the current position is returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
Returns:

The current location of the component

Return type:

Tuple[x,y]

properties(paramlist='', **kwargs)

Set or get a component’s properties

A component’s properties are used to describe the component’s appearance or control the component’s behaviour.

Parameters:**kwargs – key=value arguments
Returns:The component’s current property values
Return type:dict

See also

attributes()

reset_extents()

Reset the graph’s extents

reset_limits()

Reset the graph’s limits

show_glyphs(show=True)

Set the curve glyph visibility.

Parameters:show (bool) – Set to False to turn off the curve glyphs.
show_grid(show=True)

Set the grid’s visibility.

Parameters:show (bool) – Set to False to turn off the grid.
show_ticks(show=True)

Set the tick visibility.

Parameters:show (bool) – Set to False to turn off the tick markers.
show_x_intercept(show=True)

Set the X intercept visibility on or off

show_y_intercept(show=True)

Set the Y intercept visibility on or off

size(width=None, height=None)

Get or set the component’s size

If the width & height parameters are given, the size is set. If they are omitted, the current size is returned.

Parameters:
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current size of the component

Return type:

Tuple[width, height]

toggle_curve_glyphs()

Toggle curve glyphs on or off

toggle_grid_lines()

Toggle grid lines on or off

toggle_tick_marks()

Toggle tick marks on or off

toggle_x_intercept()

Toggle X intercept on or off

toggle_y_intercept()

Toggle Y intercept on or off

zoom(xmin=None, xmax=None, ymin=None, ymax=None, *, compute_x_grid=True, compute_y_grid=True)

Alter the graph’s viewport

zoom_extents(x_extents=True, y_extents=True)

Reset the graph’s zoom to the X and/or Y extents. By default, both X and Y axis zoom is affected.

Parameters:
  • x_extents (bool) – set to False to not affect X-axis
  • y_extents (bool) – set to False to not affect Y-axis
zoom_limits(x_limits=True, y_limits=True)

Reset the graph’s zoom to the X and/or Y limits. By default, both X and Y axis zoom is affected.

Parameters:
  • x_limits (bool) – set to False to not affect X-axis
  • y_limits (bool) – set to False to not affect Y-axis
zoom_x_extents()

Reset the graph’s zoom for the X-axis to the X extents.

zoom_x_limits()

Reset the graph’s zoom for the X-axis to the X limits.

zoom_y_extents()

Reset the graph’s zoom for the Y-axis to the Y extents.

zoom_y_limits()

Reset the graph’s zoom for the Y-axis to the Y limits.

Curves

class mhi.enerplot.Curve

Graph Curve

channel()

Retrieve the channel associated with a curve

generate_new_record()

Your description here

attributes(**kwargs)

Set or get a component’s attributes

A component’s attributes are used to describe the component’s location and size relative to its parent.

Parameters:**kwargs – key=value arguments
Returns:The component’s current attributes.
Return type:dict

See also

properties()

book

The book the component belongs to (read-only)

book_name

The book the component belongs to (read-only)

classid

The classid of the component (read-only)

copy()

Copy the component to the clipboard

copy_as_bitmap()

Copy component to clipboard as a bitmap

copy_as_metafile()

Copy component to clipboard as a metafile

cut()

Remove the component to the clipboard

decreasing()

Test if a trace contains strictly decreasing values.

Returns:True if every value is smaller than the previous one.
Return type:bool
extents(x=None, y=None, width=None, height=None)

Get or set the component’s position and size

If all parameters are given, the position and size is set. If all parameters are omitted, the current extents are returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current extents of the component

Return type:

Tuple[x,y,width,height]

find([classid,] [key=value, ...])

Find the (singular) component that matches the given criteria, or None if no matching component can be found. Raises an exception if more than one component matches the given criteria.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

find_all([classid,] [key=value, ...])

Find all components that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the list of matching components

Return type:

List[Component]

find_first([classid,] [key=value, ...])

Find a component that matches the given criteria, or None if no matching component can be found.

Parameters:
  • classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
  • key=value – additional parameters which must be matched.
Returns:

the found component or None

Return type:

Component

id

The id of the component (read-only)

increasing()

Test if a trace contains strictly increasing values.

A strictly increase trace is suitable to use as the domain of a dataset.

Returns:True if every value is larger than the previous one.
Return type:bool
list(classid=None)

List all the components contained inside this object, possibly restricted to a certain classid.

Parameters:classid (str) – one of “GraphFrame”, “PlotFrame”, “FFTFrame”, “Divider”, or “Sticky”.
Returns:the list of components
Return type:List[Component]
main

A reference to the Application object that returned this Remotable object.

parent()

Retrieve the owner of this component

paste()

Paste the component(s) from the clipboard to this canvas

position(x=None, y=None)

Get or set the component’s position.

If the x & y parameters are given, the position is set. If they are omitted, the current position is returned.

Parameters:
  • x (int) – The component’s new x location on the sheet
  • y (int) – The component’s new y location on the sheet
Returns:

The current location of the component

Return type:

Tuple[x,y]

properties(paramlist='', **kwargs)

Set or get a component’s properties

A component’s properties are used to describe the component’s appearance or control the component’s behaviour.

Parameters:**kwargs – key=value arguments
Returns:The component’s current property values
Return type:dict

See also

attributes()

size(width=None, height=None)

Get or set the component’s size

If the width & height parameters are given, the size is set. If they are omitted, the current size is returned.

Parameters:
  • width (int) – The component’s new width
  • height (int) – The component’s new height
Returns:

The current size of the component

Return type:

Tuple[width, height]