namruto77's picture
Upload VeriRender benchmark dataset
d323f57 verified
Raw
History Blame Contribute Delete
1.38 kB
import numpy as np
import matplotlib.pyplot as plt
# ── Parameters ─────────────────────────────────────────────────────────────
seed = 1903
size = 30
colormap = "viridis"
n_blobs = 2
# ── Data ────────────────────────────────────────────────────────────────────
x = np.linspace(-3.0, 3.0, size)
y = np.linspace(-2.0, 4.0, size)
X, Y = np.meshgrid(x, y)
Z = np.zeros((size, size))
Z += -1.033551 * np.exp(
-((X - -1.404482)**2 / (2 * 1.339289**2)
+ (Y - 1.882034)**2 / (2 * 1.391416**2))
)
Z += 1.047285 * np.exp(
-((X - 0.383779)**2 / (2 * 0.635175**2)
+ (Y - 1.768766)**2 / (2 * 1.234761**2))
)
# ── Plot ────────────────────────────────────────────────────────────────────
fig, ax = plt.subplots(figsize=(6, 5))
im = ax.pcolormesh(X, Y, Z, cmap=colormap, shading="auto")
fig.colorbar(im, ax=ax, label="Intensity")
ax.set_title(f"Gaussian Heatmap ({n_blobs} blob(s))")
ax.set_xlabel("X")
ax.set_ylabel("Y")
fig.tight_layout()
plt.show()