pyvista.examples.planets.download_milkyway_sky_background

pyvista.examples.planets.download_milkyway_sky_background#

download_milkyway_sky_background(texture=False, load=True)[source]#

Download the sky texture of the Milky Way galaxy.

Textures obtained from tamaskis/planet3D-MATLAB.

Parameters:
texturebool, default: False

Set to True when loading the surface as a texture.

loadbool, default: True

Load the dataset. When False, return the path to the file.

Returns:
pyvista.DataSet | pyvista.Texture | str

Texture, Dataset, or path to the file depending on the load and texture parameters.

Examples

Load the Milky Way sky image as a background image.

>>> from pyvista import examples
>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> image_path = examples.planets.download_milkyway_sky_background(load=False)
>>> pl.add_background_image(image_path)
>>> pl.show()
../../../_images/pyvista-examples-planets-download_milkyway_sky_background-1_00_00.png