pyvista.examples.downloads.download_stars_cloud_hyg#
- download_stars_cloud_hyg(load=True)[source]#
Download a point cloud of stars as computed by the HYG Database.
See HYG-Database for more details.
This data set is licensed by a Creative Commons Attribution-ShareAlike license. For more details, read the Creative Commons page
See the README.md for more details for how the star colors were computed.
Distances are in parsecs from Earth.
- Parameters:
- Returns:
pyvista.PolyData
|str
DataSet or filename depending on
load
.
Examples
Download and plot a point cloud of stars within 3,000 light years. Stars are colored according to their RGBA colors.
>>> import numpy as np >>> from pyvista import examples >>> stars = examples.download_stars_cloud_hyg() >>> stars.plot( ... style='points_gaussian', ... background='k', ... point_size=0.5, ... scalars='_rgba', ... render_points_as_spheres=False, ... zoom=3.0, ... )
>>> stars PolyData (...) N Cells: 107857 N Points: 107857 N Strips: 0 X Bounds: -9.755e+02, 9.774e+02 Y Bounds: -9.620e+02, 9.662e+02 Z Bounds: -9.788e+02, 9.702e+02 N Arrays: 3
See also
- Stars Cloud Hyg Dataset
See this dataset in the Dataset Gallery for more info.
- Plotting Point Clouds
More details on how to plot point clouds.