pyvista.examples.downloads.download_yinyang

pyvista.examples.downloads.download_yinyang#

download_yinyang(*, load=True)[source]#

Download yinyang dataset.

Added in version 0.46.0.

Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
pyvista.ImageData | str

DataSet or filename depending on load.

Examples

Load the image and plot it as grayscale pixel cells.

>>> from pyvista import examples
>>> dataset = examples.download_yinyang()
>>> pixel_cells = dataset.points_to_cells()
>>> pixel_cells.plot(
...     cmap='gray',
...     clim=[0, 255],
...     cpos='xy',
...     zoom='tight',
...     lighting=False,
...     show_scalar_bar=False,
...     show_axes=False,
... )
../../../_images/pyvista-examples-downloads-download_yinyang-1_00_00.png

See also

Yinyang Dataset

See this dataset in the Dataset Gallery for more info.