Line & Scatter

Radial Burst Scatter

Points arranged in radial pattern with glow effect.

Output
Radial Burst Scatter
Python
import matplotlib.pyplot as plt
import numpy as np

# === STYLE CONFIG ===
COLORS = {
    'inner': '#F59E0B',      # Amber
    'outer': '#EF4444',      # Red
    'background': '#0F172A',
    'text': '#E2E8F0',
    'grid': '#334155',
}

# === DATA ===
np.random.seed(42)
n_rings = 4
points_per_ring = [6, 10, 14, 18]
center = (5, 4)

all_x, all_y, all_r = [], [], []
for ring, n_points in enumerate(points_per_ring):
    radius = 1 + ring * 0.9
    angles = np.linspace(0, 2*np.pi, n_points, endpoint=False)
    angles += np.random.uniform(0, 0.3, n_points)
    for a in angles:
        all_x.append(center[0] + radius * np.cos(a))
        all_y.append(center[1] + radius * np.sin(a))
        all_r.append(ring)

# === FIGURE ===
fig, ax = plt.subplots(figsize=(10, 6), dpi=100)
ax.set_facecolor(COLORS['background'])
fig.patch.set_facecolor(COLORS['background'])

# === PLOT ===
# Color gradient based on distance
colors = [plt.cm.YlOrRd(0.3 + 0.6 * r / 3) for r in all_r]

for xi, yi, c in zip(all_x, all_y, colors):
    for s, alpha in [(200, 0.08), (100, 0.15), (50, 0.3)]:
        ax.scatter([xi], [yi], s=s, color=c, alpha=alpha)
    ax.scatter([xi], [yi], s=25, color=c, edgecolors='white', linewidths=1)

# Center glow
for s, alpha in [(500, 0.05), (250, 0.1), (100, 0.2)]:
    ax.scatter([center[0]], [center[1]], s=s, color=COLORS['inner'], alpha=alpha)
ax.scatter([center[0]], [center[1]], s=60, color=COLORS['inner'],
           edgecolors='white', linewidths=2)

# === AXES ===
ax.set_xlim(0, 10)
ax.set_ylim(0, 8)
ax.set_xlabel('X', fontsize=10, color=COLORS['text'], labelpad=10)
ax.set_ylabel('Y', fontsize=10, color=COLORS['text'], labelpad=10)
ax.set_aspect('equal')

# === STYLING ===
for spine in ax.spines.values():
    spine.set_visible(False)

ax.tick_params(axis='both', colors=COLORS['text'], labelsize=9, length=0, pad=8)

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Pairwise Data

Did this help you?

Support PyLucid to keep it free & growing

Support