pyvista.plotting.widgets.WidgetHelper.add_logo_widget#
- WidgetHelper.add_logo_widget(
- logo: pyvista.ImageData | str | pathlib.Path | None = None,
- position: tuple[float, float] | Sequence[float] | NumpyArray[float] = (0.75, 0.8),
- size: tuple[float, float] | Sequence[float] | NumpyArray[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()