sdynpy.core.sdynpy_geometry.GeometryPlotter
- class GeometryPlotter(*args, **kwargs)[source]
Bases:
BackgroundPlotter
Class used to plot geometry
This class is essentially identical to PyVista’s BackgroundPlotter; however a small amount of additional functionality is added.
Methods
__init__
(*args, **kwargs)Initialize the qt plotter.
save_rotation_animation
([filename, frames, ...])Saves an animation of the rotating geometry to a file
show_origin_marker
([arrow_scale])Attributes
- save_rotation_animation(filename=None, frames=20, frame_rate=20, individual_images=False)[source]
Saves an animation of the rotating geometry to a file
- Parameters
filename (str, optional) – Path to the file being saved. The default is None, which returns the images as an array rather than saves them to a file
frames (int, optional) – Number of frames in the animation. The default is 20.
frame_rate (float, optional) – Number of frames per second if the animation is saved to a GIF. The default is 20.
individual_images (bool, optional) – Boolean to specify whether the images are saved as individual PNG files or a single GIF. The default is False.
- Returns
imgs – Returns array of images if filename is None, otherwise returns None
- Return type
np.ndarray or None