sdynpy.core.sdynpy_geometry.GeometryPlotter
- class GeometryPlotter(show: bool = True, app: Optional[QApplication] = None, window_size: Optional[Tuple[int, int]] = None, off_screen: Optional[bool] = None, allow_quit_keypress: bool = True, toolbar: bool = True, menu_bar: bool = True, editor: bool = True, update_app_icon: Optional[bool] = None, app_window_class: Optional[Type[MainWindow]] = None, **kwargs: Any)[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.
- __init__(show: bool = True, app: Optional[QApplication] = None, window_size: Optional[Tuple[int, int]] = None, off_screen: Optional[bool] = None, allow_quit_keypress: bool = True, toolbar: bool = True, menu_bar: bool = True, editor: bool = True, update_app_icon: Optional[bool] = None, app_window_class: Optional[Type[MainWindow]] = None, **kwargs: Any) None
Initialize the qt plotter.
Methods
save_rotation_animation
([filename, frames, ...])Saves an animation of the rotating geometry to a file
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