pyvista.Plotter.add_logo_widget#

Plotter.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,
)[source]#

Add a logo widget to the top of the viewport.

If no logo is passed, the PyVista logo will be used.

Parameters:
logopyvista.ImageData or pathlib.Path, optional

The logo to display. If a pathlike is passed, it is assumed to be a file path to an image.

positiontuple(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.

sizetuple(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.

opacityfloat, optional

The opacity of the logo. Must be between 0 and 1.

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()
../../../_images/pyvista-Plotter-add_logo_widget-1_00_00.png