pyvista.examples.planets.load_earth

Contents

pyvista.examples.planets.load_earth#

load_earth(radius=1.0, lat_resolution=50, lon_resolution=100)[source]#

Load the planet Earth as a textured sphere.

Parameters:
radiusfloat, default: 1.0

Sphere radius.

lat_resolutionint, default: 50

Set the number of points in the latitude direction.

lon_resolutionint, default: 100

Set the number of points in the longitude direction.

Returns:
pyvista.PolyData

Earth dataset.

Examples

>>> import pyvista as pv
>>> from pyvista import examples
>>> mesh = examples.planets.load_earth()
>>> texture = examples.load_globe_texture()
>>> image_path = examples.planets.download_stars_sky_background(load=False)
>>> mesh.plot(texture=texture, background=image_path)
../../../_images/pyvista-examples-planets-load_earth-1_00_00.png