Core’s PlotBase#
Classes:
|
Class with the basic attributes and methods for the plot objects. |
- class symmeplot.core.plot_base.PlotBase(inertial_frame: ReferenceFrame, zero_point: Point, sympy_object: Any, name: str | None = None)#
Bases:
ABC
Class with the basic attributes and methods for the plot objects.
- Parameters:
inertial_frame (
sympy.physics.vector.frame.ReferenceFrame
) – The reference frame with respect to which the object is oriented.zero_point (
sympy.physics.vector.point.Point
) – The absolute origin with respect to which the object is positioned.name (
str
, optional) – Name of the plot object. Default is the name of the object being plotted.
Notes
The format of expressions and therefore values is as follows:
tuple(self._values, tuples of expressions for children artists)
where self._values is tuple(expressions for own artists).
Methods:
add_artist
(artist, exprs)Add an artist to the plot object.
Return a tuple of the necessary expressions for plotting.
Return the expressions used in plotting the sympy object.
plot
(*args, **kwargs)Plot the associated plot objects.
update
()Update the objects on the scene, based on the currect values.
Attributes:
Artists used to plot the object.
Child objects in the plot hierarchy.
The reference frame with respect to which the object is oriented.
Name of the plot object.
The absolute origin with respect to which the object is positioned.
List of evaluated values for the object's variables.
If the object is be visible in the plot.
The absolute origin with respect to which the object is positioned.
- add_artist(artist: ArtistBase, exprs: Expr | tuple[Expr, ...])#
Add an artist to the plot object.
- Parameters:
artist (
ArtistBase
) – The artist to be added.exprs (
expression
ortuple
ofexpressions
) – Args used to update the artist in the form of expressions.
- property artists: tuple[ArtistBase, ...]#
Artists used to plot the object.
- get_expressions_to_evaluate() tuple #
Return a tuple of the necessary expressions for plotting.
- get_sympy_object_exprs() tuple[Any, ...] #
Return the expressions used in plotting the sympy object.
- property inertial_frame: ReferenceFrame#
The reference frame with respect to which the object is oriented.
- property name: str#
Name of the plot object. Default is the name of the object being plotted.
- abstract plot(*args, **kwargs) None #
Plot the associated plot objects.
- property sympy_object: Any#
The absolute origin with respect to which the object is positioned.
- update() None #
Update the objects on the scene, based on the currect values.
- property values: tuple#
List of evaluated values for the object’s variables.
- abstract property visible: bool#
If the object is be visible in the plot.
Notes
Subclasses should also implement the setter of this property.