madgui.plot.scene module¶
Plot base classes.
Classes
An element of a figure. |
|
|
Delegates to draw function that returns a list of matplotlib artists. |
|
A scene element that is composed of multiple elements. |
|
|
|
Plot a single line using an fetch function. |
-
class
madgui.plot.scene.
LineBundle
[source]¶ Bases:
list
Methods
redraw
()remove
(value)Raises ValueError if the value is not present.
-
class
madgui.plot.scene.
ListView
(name, model, fn, *args, **kwargs)[source]¶ Bases:
madgui.plot.scene.SceneGraph
Methods
destroy
()Cleanup all allocated ressources and disconnect signals.
-
class
madgui.plot.scene.
SceneGraph
(name, items=(), figure=None)[source]¶ Bases:
madgui.plot.scene.SceneNode
A scene element that is composed of multiple elements.
Methods
add
(*items)Extend by several children.
destroy
()Cleanup all allocated ressources and disconnect signals.
extend
(items)Extend by several children.
insert
(index, item)cleanup references to drawn state. Called when the figure was cleared,
pop
(item)Remove and hide one item (by value).
-
destroy
()[source]¶ Cleanup all allocated ressources and disconnect signals. Called when the SceneNode is removed from the graph and not needed anymore.
-
-
class
madgui.plot.scene.
SceneNode
[source]¶ Bases:
object
An element of a figure.
Methods
destroy
()Cleanup all allocated ressources and disconnect signals.
Let the canvas know that it has to redraw.
enable
([enabled])Enable/disable the element individually.
enabled
()Check whether this element should be drawn.
Mark drawn state as stale and redraw if needed.
node
(name)Find and return child node by name.
cleanup references to drawn state. Called when the figure was cleared,
render
([show])Draw or remove this node (and all children) from the figure.
Attributes
tuple() -> empty tuple
bool(x) -> bool
-
destroy
()[source]¶ Cleanup all allocated ressources and disconnect signals. Called when the SceneNode is removed from the graph and not needed anymore.
-
property
figure
¶
-
items
= ()¶
-
lines
= None¶
-
name
= None¶
-
on_clear_figure
()[source]¶ cleanup references to drawn state. Called when the figure was cleared, but the SceneNode is still part of the SceneGraph for next redraw.
-
parent
= None¶
-
shown
= False¶
-
-
class
madgui.plot.scene.
SimpleArtist
(name, artist, *args, **kwargs)[source]¶ Bases:
madgui.plot.scene.SceneNode
Delegates to draw function that returns a list of matplotlib artists.