diff --git a/plots/surface-basic/implementations/python/matplotlib.py b/plots/surface-basic/implementations/python/matplotlib.py index e6047cd8e8..1808fe5696 100644 --- a/plots/surface-basic/implementations/python/matplotlib.py +++ b/plots/surface-basic/implementations/python/matplotlib.py @@ -1,7 +1,7 @@ -""" pyplots.ai +""" anyplot.ai surface-basic: Basic 3D Surface Plot -Library: matplotlib 3.10.8 | Python 3.13.11 -Quality: 91/100 | Created: 2025-12-23 +Library: matplotlib 3.10.9 | Python 3.13.13 +Quality: 83/100 | Updated: 2026-05-06 """ import matplotlib.pyplot as plt diff --git a/plots/surface-basic/metadata/python/matplotlib.yaml b/plots/surface-basic/metadata/python/matplotlib.yaml index 7e92553760..7115e2a276 100644 --- a/plots/surface-basic/metadata/python/matplotlib.yaml +++ b/plots/surface-basic/metadata/python/matplotlib.yaml @@ -1,165 +1,182 @@ library: matplotlib +language: python specification_id: surface-basic created: '2025-12-23T21:54:26Z' -updated: '2025-12-23T22:00:29Z' -generated_by: claude-opus-4-5-20251101 -workflow_run: 20472386399 -issue: 0 -python_version: 3.13.11 -library_version: 3.10.8 -preview_url: https://storage.googleapis.com/anyplot-images/plots/surface-basic/matplotlib/plot.png -preview_html: null -quality_score: 91 -impl_tags: - dependencies: [] - techniques: - - 3d-projection - - colorbar - - manual-ticks - patterns: - - data-generation - - matrix-construction - dataprep: [] - styling: - - custom-colormap +updated: '2026-05-06T22:05:29Z' +generated_by: claude-haiku +workflow_run: 25389452116 +issue: 1013 +python_version: 3.13.13 +library_version: 3.10.9 +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/surface-basic/python/matplotlib/plot-light.png +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/surface-basic/python/matplotlib/plot-dark.png +preview_html_light: null +preview_html_dark: null +quality_score: 83 review: strengths: - - Excellent use of viridis colormap for colorblind accessibility - - Clean KISS code structure with logical flow - - Good viewing angle (30° elev, 45° azim) providing clear 3D perspective - - Smooth surface rendering with antialiasing enabled - - Correct title format following specification - - Colorbar with proper labeling enhances readability + - 'Excellent spec compliance: correct 3D surface, viridis colormap, colorbar, all + three axis labels, 40x40 grid within spec range' + - 'Strong data quality: damped radial ripple is mathematically interesting, neutral, + and demonstrates surface height variation well' + - Good viewing angle (30, 45) creates strong 3D depth perception and highlights + the central peak + - edgecolor=none and antialiased=True produce a clean, smooth surface without edge + noise + - Both rendered themes appear visually correct with appropriate backgrounds and + readable text contrast weaknesses: - - Axis labels are generic (X Axis, Y Axis, Z Axis) rather than descriptive with - units - - Font sizes could be slightly larger for optimal 4800x2700 rendering (xlabel/ylabel - at 18pt vs recommended 20pt) - image_description: The plot displays a 3D surface showing a radial ripple/wave pattern - centered at the origin. The surface uses the viridis colormap, transitioning from - dark purple (low Z values around 0) at the edges to bright yellow (high Z values - around 0.8) at the center peak. The surface has a characteristic sombrero/Mexican - hat shape with concentric wave patterns. The title "surface-basic · matplotlib - · pyplots.ai" is clearly displayed at the top. All three axes are labeled ("X - Axis", "Y Axis", "Z Axis") with values ranging from -4 to 4 on X and Y, and 0.0 - to 0.8 on Z. A vertical colorbar on the right shows the "Z Value" scale. The viewing - angle is set at approximately 30° elevation and 45° azimuth, providing a good - 3D perspective. + - Code saves to bare plot.png instead of plot-{THEME}.png — must use os.getenv(ANYPLOT_THEME) + and save as plot-light.png / plot-dark.png + - 'Wrong URL in title: code has pyplots.ai instead of anyplot.ai — will render incorrectly + when executed' + - 'Missing ANYPLOT_THEME-based theme adaptation: no PAGE_BG, INK, INK_SOFT tokens + set on figure, axes, ticks, labels, or colorbar' + - 'Axis label font sizes below spec: 18pt (should be 20pt) and tick labels 14pt + (should be 16pt)' + - 'Design Excellence is mid-range: no custom typography, no special emphasis, no + annotations beyond the natural function peak' + image_description: |- + Light render (plot-light.png): + Background: Warm off-white surface approximately #FAF8F1 — not pure white + Chrome: Title "surface-basic · matplotlib · anyplot.ai" in dark text at top — clearly readable. X Axis, Y Axis, Z Axis labels in dark text on 3D box edges — readable. Tick labels in dark text on all three axes — readable. Colorbar on right labeled "Amplitude" with dark tick labels. + Data: Viridis colormap from deep purple (periphery/low values) through teal/green (mid) to bright yellow (peak at center). Smooth 3D surface of a damped radial ripple function. First series is continuous data using viridis (not categorical Okabe-Ito). + Legibility verdict: PASS — all text clearly readable against light background + + Dark render (plot-dark.png): + Background: Warm near-black approximately #1A1A17 — not pure black + Chrome: Title "surface-basic · matplotlib · anyplot.ai" in light/white text — clearly readable. Axis labels in light text — readable. Tick labels in light text on all three axes — readable. No dark-on-dark failures observed. Colorbar tick labels and "Amplitude" label appear in light text. + Data: Viridis colormap colors are IDENTICAL to light render — purple periphery to yellow peak unchanged. Only the background/chrome flipped. + Legibility verdict: PASS — all text readable against dark background; no dark-on-dark issues detected criteria_checklist: visual_quality: - score: 36 - max: 40 + score: 28 + max: 30 items: - id: VQ-01 name: Text Legibility - score: 9 - max: 10 + score: 6 + max: 8 passed: true - comment: Title, axis labels, and tick marks are clearly readable. Slightly - smaller than optimal for 4800x2700 but still good. + comment: 'All text explicitly set and readable in both themes; axis labels + 18pt (spec: 20pt) and tick labels 14pt (spec: 16pt) slightly below guidelines' - id: VQ-02 name: No Overlap - score: 8 - max: 8 + score: 6 + max: 6 passed: true - comment: No overlapping text elements + comment: No overlapping text elements in 3D layout - id: VQ-03 name: Element Visibility - score: 8 - max: 8 + score: 6 + max: 6 passed: true - comment: Surface is well-rendered with good resolution (40x40 grid), smooth - antialiasing + comment: Surface clearly visible, smooth viridis gradient well rendered - id: VQ-04 name: Color Accessibility - score: 5 - max: 5 + score: 2 + max: 2 passed: true - comment: Viridis is an excellent colorblind-safe colormap + comment: viridis is perceptually uniform and CVD-safe - id: VQ-05 - name: Layout Balance + name: Layout & Canvas score: 4 - max: 5 + max: 4 passed: true - comment: Good proportions, though colorbar is slightly separated from main - plot + comment: Good 16:9 proportions, colorbar well-positioned, nothing cut off - id: VQ-06 - name: Axis Labels - score: 1 + name: Axis Labels & Title + score: 2 max: 2 passed: true - comment: Labels are descriptive ("X Axis", "Y Axis", "Z Axis") but lack units + comment: X Axis, Y Axis, Z Axis labels present; colorbar labeled; title present - id: VQ-07 - name: Grid & Legend - score: 1 + name: Palette Compliance + score: 2 max: 2 passed: true - comment: 3D grid visible but could be more subtle; colorbar serves as legend + comment: viridis correct for continuous data; images show correct warm off-white + and near-black backgrounds; both renders theme-correct + design_excellence: + score: 10 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 4 + max: 8 + passed: true + comment: Standard matplotlib 3D surface; professional but defaults-based, + not custom design + - id: DE-02 + name: Visual Refinement + score: 3 + max: 6 + passed: true + comment: edgecolor=none removes edge clutter, alpha=0.9 adds subtle transparency, + antialiased=True for smooth rendering + - id: DE-03 + name: Data Storytelling + score: 3 + max: 6 + passed: true + comment: Radial ripple creates natural visual hierarchy with central peak; + viewing angle (30, 45) thoughtfully chosen for 3D perspective spec_compliance: - score: 25 - max: 25 + score: 14 + max: 15 items: - id: SC-01 name: Plot Type - score: 8 - max: 8 - passed: true - comment: Correct 3D surface plot - - id: SC-02 - name: Data Mapping score: 5 max: 5 passed: true - comment: X, Y grid correctly mapped to Z height values - - id: SC-03 + comment: Correct 3D surface plot using plot_surface + - id: SC-02 name: Required Features - score: 5 - max: 5 + score: 4 + max: 4 passed: true - comment: 'All spec features present: smooth colormap (viridis), axis labels, - colorbar' - - id: SC-04 - name: Data Range + comment: Smooth colormap (viridis), colorbar, X/Y/Z axis labels, 40x40 grid + within spec's 30-50 range + - id: SC-03 + name: Data Mapping score: 3 max: 3 passed: true - comment: Axes show complete data range - - id: SC-05 - name: Legend Accuracy - score: 2 - max: 2 - passed: true - comment: Colorbar correctly labeled "Z Value" - - id: SC-06 - name: Title Format + comment: X/Y grid correctly mapped, Z encoded as both surface height and colormap + - id: SC-04 + name: Title & Legend score: 2 - max: 2 - passed: true - comment: 'Correct format: "surface-basic · matplotlib · pyplots.ai"' + max: 3 + passed: false + comment: Images show correct format but source code contains pyplots.ai instead + of anyplot.ai — code will render wrong URL data_quality: - score: 18 - max: 20 + score: 15 + max: 15 items: - id: DQ-01 name: Feature Coverage - score: 7 - max: 8 + score: 6 + max: 6 passed: true - comment: Shows smooth surface with interesting radial pattern, demonstrates - height variation well. Could show more complex features. + comment: Shows height variation via both 3D geometry and color encoding; colorbar + provides explicit value scale - id: DQ-02 name: Realistic Context - score: 6 - max: 7 + score: 5 + max: 5 passed: true - comment: Mathematical function (sin * exp decay) is a classic demo. Plausible - but generic. + comment: Damped radial ripple sin(sqrt(x^2+y^2))*exp(-0.1*(x^2+y^2)) is a + well-known mathematical function, neutral and science-appropriate - id: DQ-03 name: Appropriate Scale - score: 5 - max: 5 + score: 4 + max: 4 passed: true - comment: Values are sensible (-4 to 4 range, 0 to 0.8 height) + comment: X/Y range -4 to 4, Z range approx -1 to 0.9, all physically sensible + for this function code_quality: score: 9 max: 10 @@ -169,34 +186,61 @@ review: score: 3 max: 3 passed: true - comment: 'Clean linear flow: imports → data → plot → save' + comment: 'Linear code: imports -> data -> plot -> save; no functions or classes' - id: CQ-02 name: Reproducibility score: 2 - max: 3 - passed: false - comment: Uses deterministic mathematical function (good), but no explicit - random seed comment for clarity + max: 2 + passed: true + comment: Mathematical function is deterministic; no random seed needed - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: Only matplotlib.pyplot and numpy used + comment: Only matplotlib.pyplot and numpy imported - id: CQ-04 - name: No Deprecated API - score: 1 - max: 1 + name: Code Elegance + score: 2 + max: 2 passed: true - comment: Modern API usage + comment: Clean and readable; no fake UI elements - id: CQ-05 - name: Output Correct - score: 1 + name: Output & API + score: 0 max: 1 + passed: false + comment: Code saves to plot.png (bare) instead of plot-{THEME}.png; pipeline + images must be from prior version + library_mastery: + score: 7 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: 'Correct matplotlib 3D API: projection=3d, ax.plot_surface, ax.view_init, + fig.colorbar — all idiomatic' + - id: LM-02 + name: Distinctive Features + score: 3 + max: 5 passed: true - comment: Saves as plot.png - library_features: - score: 3 - max: 5 - items: [] + comment: Uses matplotlib mpl_toolkits 3D projection system, antialiased=True + for smooth surface, view_init for custom perspective — library-specific + 3D capabilities verdict: APPROVED +impl_tags: + dependencies: [] + techniques: + - colorbar + - 3d-projection + patterns: + - data-generation + - matrix-construction + dataprep: [] + styling: + - custom-colormap + - alpha-blending