pyvista.Plotter.add_logo_widget#
- Plotter.add_logo_widget(
- logo: pyvista.ImageData | str | pathlib.Path | None = None,
- position: VectorLike[float] = (0.75, 0.8),
- size: VectorLike[float] = (0.2, 0.2),
- opacity: float = 1.0,
Add a logo widget to the top of the viewport.
If no logo is passed, the PyVista logo will be used.
- Parameters:
- logo
pyvista.ImageData
orpathlib.Path
,optional
The logo to display. If a pathlike is passed, it is assumed to be a file path to an image.
- position
tuple
(float
),optional
The position of the logo in the viewport. The first value is the horizontal position and the second value is the vertical position. Both values must be between 0 and 1.
- size
tuple
(float
),optional
The size of the logo in the viewport. The first value is the horizontal size and the second value is the vertical size. Both values must be between 0 and 1.
- opacity
float
,optional
The opacity of the logo. Must be between 0 and 1.
- logo
- Returns:
vtkLogoWidget
The logo widget.
Examples
Add a logo widget to the scene.
>>> import pyvista as pv >>> pl = pv.Plotter() >>> _ = pl.add_logo_widget() >>> _ = pl.add_mesh(pv.Sphere(), show_edges=True) >>> pl.show()