# Examples from pyvista.examples.downloads.download_cloud_dark_matter
# ===================================================================

# Download the dark matter cloud and display its representation.
import numpy as np
from pyvista import examples
pc = examples.download_cloud_dark_matter()
pc

# Plot the point cloud. Color based on the distance from the center of the
# cloud.
pc.plot(
    scalars=np.linalg.norm(pc.points - pc.center, axis=1),
    style='points_gaussian',
    opacity=0.5,
    point_size=1.5,
    show_scalar_bar=False,
    zoom=2,
)

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code
