Skip to content

Commit 17f5a6a

Browse files
feat(matplotlib): implement wireframe-3d-basic (#1061)
## Implementation: `wireframe-3d-basic` - matplotlib Implements the **matplotlib** version of `wireframe-3d-basic`. **File:** `plots/wireframe-3d-basic/implementations/matplotlib.py` **Parent Issue:** #1015 --- :robot: *[impl-generate workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20274573094)* --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1ab48d4 commit 17f5a6a

2 files changed

Lines changed: 71 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""
2+
wireframe-3d-basic: Basic 3D Wireframe Plot
3+
Library: matplotlib
4+
"""
5+
6+
import matplotlib.pyplot as plt
7+
import numpy as np
8+
9+
10+
# Data - create ripple function z = sin(sqrt(x^2 + y^2))
11+
np.random.seed(42)
12+
x = np.linspace(-6, 6, 40)
13+
y = np.linspace(-6, 6, 40)
14+
X, Y = np.meshgrid(x, y)
15+
R = np.sqrt(X**2 + Y**2)
16+
Z = np.sin(R)
17+
18+
# Create 3D plot
19+
fig = plt.figure(figsize=(16, 9))
20+
ax = fig.add_subplot(111, projection="3d")
21+
22+
# Plot wireframe with Python Blue color
23+
ax.plot_wireframe(X, Y, Z, color="#306998", linewidth=1.5, alpha=0.8)
24+
25+
# Set viewing angle (elevation 30, azimuth 45 as per spec)
26+
ax.view_init(elev=30, azim=45)
27+
28+
# Labels and styling
29+
ax.set_xlabel("X", fontsize=20, labelpad=15)
30+
ax.set_ylabel("Y", fontsize=20, labelpad=15)
31+
ax.set_zlabel("Z", fontsize=20, labelpad=15)
32+
ax.set_title("wireframe-3d-basic · matplotlib · pyplots.ai", fontsize=24, pad=20)
33+
34+
# Tick parameters
35+
ax.tick_params(axis="both", labelsize=14)
36+
ax.tick_params(axis="z", labelsize=14)
37+
38+
# Subtle grid
39+
ax.xaxis.pane.fill = False
40+
ax.yaxis.pane.fill = False
41+
ax.zaxis.pane.fill = False
42+
ax.xaxis.pane.set_edgecolor("gray")
43+
ax.yaxis.pane.set_edgecolor("gray")
44+
ax.zaxis.pane.set_edgecolor("gray")
45+
ax.grid(True, alpha=0.3, linestyle="--")
46+
47+
plt.tight_layout()
48+
plt.savefig("plot.png", dpi=300, bbox_inches="tight")
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Per-library metadata for matplotlib implementation of wireframe-3d-basic
2+
# Auto-generated by impl-generate.yml
3+
4+
library: matplotlib
5+
specification_id: wireframe-3d-basic
6+
7+
# Preview URLs (filled by workflow)
8+
preview_url: https://storage.googleapis.com/pyplots-images/plots/wireframe-3d-basic/matplotlib/plot.png
9+
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/wireframe-3d-basic/matplotlib/plot_thumb.png
10+
preview_html: null
11+
12+
current:
13+
version: 0
14+
generated_at: 2025-12-16T16:11:27Z
15+
generated_by: claude-opus-4-5-20251101
16+
workflow_run: 20274573094
17+
issue: 1015
18+
quality_score: 94
19+
# Version info (filled by workflow)
20+
python_version: "3.13.11"
21+
library_version: "unknown"
22+
23+
history: []

0 commit comments

Comments
 (0)