Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions plots/surface-basic/implementations/seaborn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""
surface-basic: Basic 3D Surface Plot
Library: seaborn
"""

import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns


# Set seaborn style for better aesthetics
sns.set_theme(style="whitegrid")

# Data - create a 40x40 grid for smooth visualization
x = np.linspace(-4, 4, 40)
y = np.linspace(-4, 4, 40)
X, Y = np.meshgrid(x, y)

# Gaussian-like surface with interesting features
Z = np.sin(np.sqrt(X**2 + Y**2)) * np.exp(-0.1 * (X**2 + Y**2))

# Create 3D plot (4800x2700 px)
fig = plt.figure(figsize=(16, 9))
ax = fig.add_subplot(111, projection="3d")

# Plot surface with colormap
surf = ax.plot_surface(X, Y, Z, cmap="viridis", edgecolor="none", alpha=0.9, antialiased=True)

# Add colorbar to show value scale
cbar = fig.colorbar(surf, ax=ax, shrink=0.5, aspect=10, pad=0.1)
cbar.set_label("Z Value", fontsize=16)
cbar.ax.tick_params(labelsize=12)

# Labels and styling (scaled font sizes for 4800x2700)
ax.set_xlabel("X Axis", fontsize=18, labelpad=12)
ax.set_ylabel("Y Axis", fontsize=18, labelpad=12)
ax.set_zlabel("Z Axis", fontsize=18, labelpad=12)
ax.set_title("surface-basic · seaborn · pyplots.ai", fontsize=24, pad=20)

# Tick parameters
ax.tick_params(axis="both", labelsize=14)

# Set viewing angle for good perspective
ax.view_init(elev=30, azim=45)

plt.tight_layout()
plt.savefig("plot.png", dpi=300, bbox_inches="tight")
23 changes: 23 additions & 0 deletions plots/surface-basic/metadata/seaborn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Per-library metadata for seaborn implementation of surface-basic
# Auto-generated by impl-generate.yml

library: seaborn
specification_id: surface-basic

# Preview URLs (filled by workflow)
preview_url: https://storage.googleapis.com/pyplots-images/plots/surface-basic/seaborn/plot.png
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/surface-basic/seaborn/plot_thumb.png
preview_html: null

current:
version: 0
generated_at: 2025-12-17T13:36:25Z
generated_by: claude-opus-4-5-20251101
workflow_run: 20304611493
issue: 1013
quality_score: 92
# Version info (filled by workflow)
python_version: "3.13.11"
library_version: "unknown"

history: []