Line & Scatter

Pulse Scatter

Scatter plot with pulsing glow effect on each point.

Output
Pulse Scatter
Python
import matplotlib.pyplot as plt
import numpy as np

# === STYLE CONFIG ===
COLORS = {
    'points': '#F43F5E',     # Rose
    'background': '#0F172A',
    'text': '#E2E8F0',
    'grid': '#334155',
}

# === DATA ===
np.random.seed(42)
x = np.random.uniform(1, 9, 25)
y = np.random.uniform(1, 9, 25)
sizes = np.random.uniform(0.5, 1.5, 25)

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

# === PLOT - Pulse glow effect ===
for xi, yi, si in zip(x, y, sizes):
    for size_mult, alpha in [(8, 0.03), (5, 0.06), (3, 0.12), (1.5, 0.25)]:
        ax.scatter([xi], [yi], s=200 * si * size_mult, 
                   color=COLORS['points'], alpha=alpha)
    ax.scatter([xi], [yi], s=60 * si, color=COLORS['points'],
               edgecolors='white', linewidths=1.5)

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

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

ax.xaxis.grid(True, color=COLORS['grid'], linewidth=0.5, alpha=0.3)
ax.yaxis.grid(True, color=COLORS['grid'], linewidth=0.5, alpha=0.3)
ax.set_axisbelow(True)
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