3D Scatter

Exoplanet Detection Survey

Astronomical survey of exoplanets showing orbital period, size, and distance with habitability highlighting.

Output
Exoplanet Detection Survey
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(369)

# Exoplanet properties
n_planets = 150

orbital_period = np.random.exponential(100, n_planets) + 1  # days
planet_radius = np.random.exponential(2, n_planets) + 0.5  # Earth radii
stellar_distance = np.random.exponential(500, n_planets) + 10  # parsecs

# Habitable zone indicator
temp_estimate = 280 * (orbital_period / 365) ** (-0.5)  # Simplified
habitable = (temp_estimate > 200) & (temp_estimate < 350) & (planet_radius < 2.5)

colors = ['#27F5B0' if h else '#27D3F5' for h in habitable]
sizes = planet_radius ** 2 * 20

fig = plt.figure(figsize=(10, 8), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d', facecolor='#ffffff')

ax.scatter(np.log10(orbital_period), planet_radius, stellar_distance, 
           c=colors, s=sizes, alpha=0.7, edgecolors='#374151', linewidths=0.3)

ax.set_xlabel('log₁₀(Orbital Period) [days]', color='#1f2937', fontsize=10)
ax.set_ylabel('Planet Radius (R⊕)', color='#1f2937', fontsize=10)
ax.set_zlabel('Distance (pc)', color='#1f2937', fontsize=10)
ax.set_title('Exoplanet Detection Survey', color='#1f2937', fontsize=14, fontweight='bold', pad=20)

ax.tick_params(colors='#6b7280', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#e5e7eb')
ax.yaxis.pane.set_edgecolor('#e5e7eb')
ax.zaxis.pane.set_edgecolor('#e5e7eb')

ax.view_init(elev=20, azim=45)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support