Sheets¶
-
class
mhi.enerplot.
Sheet
¶ An Enerplot Sheet
-
name
¶ The name of the sheet (read-only)
-
description
¶ The description of the sheet (read-only)
-
focus
()¶ Switches the currently focused sheet to become this sheet.
-
remove
(*components)¶ Remove components from the sheet
-
sticky
(x=None, y=None, w=None, h=None, text=None, **kwargs)¶ Create a “Sticky Note” styled TextArea
Parameters: - x (int) – x location for the Sticky Note
- y (int) – y-location for the Sticky Note
- w (int) – width of the Sticky Note
- h (int) – height of the Sticky Note
- text (str) – the contents of the sticky note
- **kwargs – Additional key=value properties for the TextArea.
Returns: the sticky note
Return type: Example:
note = sheet.sticky(1, 1, 8, 3, "Hello world", arrows="NE E SE", fg_color='yellow', bg_color='black')
Create a “Caption” styled TextArea
Parameters: - x (int) – x location for the Caption
- y (int) – y-location for the Caption
- w (int) – width of the Caption
- h (int) – height of the Caption
- text (str) – the contents of the Caption
- **kwargs – Additional key=value properties for the TextArea.
Returns: the caption
Return type: Example:
caption = sheet.caption(1, 5, 8, 2, "Output", fg_color='red')
-
divider
(x=None, y=None, w=None, h=None, **kwargs)¶ Create a “Divider”
Parameters: - x (int) – x location for the start of Divider
- y (int) – y-location for the start of Divider
- w (int) – width of the Divider (if horizontal)
- h (int) – height of the Divider (if vertical)
- **kwargs – Additional key=value properties for the note.
Returns: the divider
Return type: Example:
divider = sheet.divider(1, 10, 6, 0, state=0, style='Dash')
-
graph_frame
(x=None, y=None, w=None, h=None, **kwargs)¶ Create a “Graph Frame”
Parameters: - x (int) – x location for the start of Frame
- y (int) – y-location for the start of Frame
- w (int) – width of the Frame
- h (int) – height of the Frame
- **kwargs – Additional key=value properties for the frame.
Returns: the graph frame
Return type:
-
plot_frame
(x=None, y=None, w=None, h=None, **kwargs)¶ Create a “Plot Frame” for X-Y plots
Parameters: - x (int) – x location for the start of Frame
- y (int) – y-location for the start of Frame
- w (int) – width of the Frame
- h (int) – height of the Frame
- **kwargs – Additional key=value properties for the frame.
Returns: the x-y plot frame
Return type:
-
fft_frame
(x=None, y=None, w=None, h=None, **kwargs)¶ Create a “FFT Frame” for FFT Graphs
Parameters: - x (int) – x location for the start of Frame
- y (int) – y-location for the start of Frame
- w (int) – width of the Frame
- h (int) – height of the Frame
- **kwargs – Additional key=value properties for the frame.
Returns: the FFT graph frame
Return type:
-
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
-
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
-
cut
()¶ Remove the component to the clipboard
-
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:
-
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:
-
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]
-
parent
()¶ Retrieve the owner of this component
-
paste
()¶ Paste the component(s) from the clipboard to this canvas
-
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
-