Skip to content

feat(matplotlib): implement column-stratigraphic#4905

Merged
github-actions[bot] merged 6 commits intomainfrom
implementation/column-stratigraphic/matplotlib
Mar 15, 2026
Merged

feat(matplotlib): implement column-stratigraphic#4905
github-actions[bot] merged 6 commits intomainfrom
implementation/column-stratigraphic/matplotlib

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Implementation: column-stratigraphic - matplotlib

Implements the matplotlib version of column-stratigraphic.

File: plots/column-stratigraphic/implementations/matplotlib.py

Parent Issue: #4573


🤖 impl-generate workflow

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 15, 2026

AI Review - Attempt 1/3

Image Description

The plot displays a vertical stratigraphic column spanning 0–200m depth (increasing downward). Ten geological layers are shown as stacked rectangular blocks, each filled with a distinct hatching pattern and color: conglomerate (orange with circle pattern, Ogallala Fm), sandstone (wheat/tan with dot stipple, Arikaree/Dakota/Entrada Fms), siltstone (tan with diagonal hatching, White River/Morrison Fms), shale (gray with horizontal dashes, Chadron/Carlile Fms), and limestone (light blue with cross/plus pattern, Niobrara/Greenhorn Fms). Formation names appear to the right of each layer. Geological age labels (Miocene, Oligocene, Eocene, Cretaceous, Jurassic) appear on the left in italics with bracket lines spanning their respective depth ranges. The Y-axis is labeled "Depth (m)" with tick marks every 25m. A lithology legend sits in the lower right. The title reads "column-stratigraphic · matplotlib · pyplots.ai". Top, right, and bottom spines are removed; a subtle y-axis grid is present.

Score: 87/100

Category Score Max
Visual Quality 28 30
Design Excellence 12 20
Spec Compliance 15 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 7 10
Total 87 100

Visual Quality (28/30)

  • VQ-01: Text Legibility (7/8) — All font sizes explicitly set (title 24, ylabel 20, ticks 16, formations 14, ages 13). Formation and age labels slightly below the 16pt guideline but readable at output resolution.
  • VQ-02: No Overlap (6/6) — All text clearly separated, no collisions.
  • VQ-03: Element Visibility (6/6) — All layers clearly visible with distinct hatching patterns and colors. Layer boundaries are sharp.
  • VQ-04: Color Accessibility (4/4) — Earth-tone palette (wheat, gray, blue, tan, burlywood) is colorblind-safe with good contrast. No red-green reliance.
  • VQ-05: Layout & Canvas (3/4) — Portrait format (10×16) is appropriate for a stratigraphic column, but the column itself is narrow relative to canvas width. Some wasted horizontal space on both sides.
  • VQ-06: Axis Labels & Title (2/2) — "Depth (m)" with units, correct title format.

Design Excellence (12/20)

  • DE-01: Aesthetic Sophistication (5/8) — Geologically appropriate earth-tone color palette shows design intent. Hatching patterns are distinct and well-chosen. Above default styling but not publication-level polish.
  • DE-02: Visual Refinement (4/6) — Three spines removed, subtle grid (alpha=0.15), no x-axis ticks, bracket lines for age groupings. Good refinement but could benefit from more whitespace control and typography polish.
  • DE-03: Data Storytelling (3/6) — The geological sequence tells a natural story chronologically, and the age brackets provide temporal context. However, there's no strong focal point — no unconformity highlighted, no layer emphasized, all layers have equal visual weight.

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) — Correct vertical column with stacked rectangular blocks.
  • SC-02: Required Features (4/4) — All spec features present: 5 distinct lithology patterns with hatching, depth increasing downward, formation names on right, age labels on left with brackets, depth scale with units, solid layer boundaries.
  • SC-03: Data Mapping (3/3) — Depth correctly mapped to Y-axis with inverted convention.
  • SC-04: Title & Legend (3/3) — Title matches required format. Legend shows all 5 lithology types with correct capitalized labels.

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6) — 10 layers across 5 lithology types with varying thicknesses. Repeated lithologies (sandstone ×3, shale ×2, limestone ×2) demonstrate realistic geological repetition.
  • DQ-02: Realistic Context (5/5) — Uses real US Great Plains formations (Ogallala, Arikaree, White River, Chadron, Niobrara, Carlile, Greenhorn, Dakota, Morrison, Entrada) in correct stratigraphic order spanning Jurassic to Miocene.
  • DQ-03: Appropriate Scale (4/4) — Depths 0–200m are realistic for a borehole section. Layer thicknesses (12–25m) and geological ages are accurate.

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) — Clean linear flow: imports → data → styles → plot loop → age labels → legend → styling → save.
  • CQ-02: Reproducibility (2/2) — Fully deterministic data, no randomness.
  • CQ-03: Clean Imports (2/2) — Only matplotlib.patches and matplotlib.pyplot, both used.
  • CQ-04: Code Elegance (2/2) — Appropriate complexity. Age span aggregation is clean. No fake functionality.
  • CQ-05: Output & API (1/1) — Saves as plot.png with dpi=300 and bbox_inches='tight'.

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5) — Good use of Axes methods, FancyBboxPatch for hatched rectangles, ax.annotate for labels. Follows matplotlib patterns well.
  • LM-02: Distinctive Features (3/5) — Uses FancyBboxPatch with hatching, custom legend handles via mpatches.Patch, clip_on=False for bracket lines extending beyond axes. These are matplotlib-specific capabilities.

Score Caps Applied

  • None

Strengths

  • Excellent geological data with real formation names in correct stratigraphic order
  • All 5 lithology types have distinct, recognizable hatching patterns and appropriate earth-tone colors
  • Complete spec compliance — every required feature is present
  • Clean, well-structured code with no unnecessary complexity
  • Age bracket annotations on the left add professional geological context

Weaknesses

  • Formation name labels (14pt) and age labels (13pt) are slightly below the recommended 16pt minimum for annotation text
  • The column is narrow relative to the canvas, leaving wasted horizontal space
  • All layers have equal visual weight — no focal point or emphasis to guide the viewer's eye
  • Could benefit from more typographic refinement (e.g., bolder formation names, more polished age labels)

Issues Found

  1. DE-03 MODERATE: No visual hierarchy or focal point in the column — all layers receive equal emphasis
    • Fix: Consider highlighting a notable boundary (e.g., an unconformity between Eocene and Cretaceous) with a wavy line or color accent, or vary text weight to create hierarchy
  2. DE-01 MODERATE: Good earth-tone palette but could reach publication quality with more refinement
    • Fix: Increase formation label font size to 16pt, add subtle background shading to age groups, consider more refined hatching density
  3. VQ-05 MINOR: Horizontal space underutilized
    • Fix: Widen the column or tighten xlim to reduce empty margins

AI Feedback for Next Attempt

Increase formation/age label font sizes to at least 16pt. Create visual hierarchy by highlighting a key boundary (e.g., wavy unconformity line between Eocene and Cretaceous). Consider widening the column or tightening horizontal margins. Add subtle age-group background shading to enhance data storytelling. These changes would push the score above 90.

Verdict: REJECTED

@github-actions github-actions Bot added quality:87 Quality score 87/100 ai-rejected Quality not OK, triggers update labels Mar 15, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Mar 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor Author

🔧 Repair Attempt 1/3

Applied fixes based on AI review feedback.

Status: Repair completed, re-triggering review...


🤖 impl-repair

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 15, 2026

AI Review - Attempt 2/3

Image Description

The plot displays a vertical stratigraphic column spanning 0–200m depth (increasing downward). Ten geological layers are shown as stacked rectangular blocks, each filled with a distinct hatch pattern and color: sandstone (wheat with dot stipple), shale (gray with horizontal dashes), limestone (light blue with cross/plus pattern), siltstone (tan with diagonal lines), and conglomerate (burlywood with circle pattern). Formation names (Ogallala Fm, Arikaree Fm, White River Fm, Chadron Fm, Niobrara Fm, Carlile Shale, Greenhorn Fm, Dakota Fm, Morrison Fm, Entrada Fm) are labeled in bold to the right of each layer. Age labels (Miocene, Oligocene, Eocene, Cretaceous, Jurassic) appear in italics on the left with bracket lines spanning their respective depth ranges. A red wavy line marks an unconformity between the Eocene and Cretaceous at 72m depth with an italic red "unconformity" label. The y-axis is labeled "Depth (m)" and the title reads "column-stratigraphic · matplotlib · pyplots.ai". A horizontal legend at the bottom shows all 5 lithology types with their patterns. Top, right, and bottom spines are removed; a subtle dashed grid is visible on the y-axis.

Score: 91/100

Category Score Max
Visual Quality 29 30
Design Excellence 15 20
Spec Compliance 15 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 7 10
Total 91 100

Visual Quality (29/30)

  • VQ-01: Text Legibility (8/8) — All font sizes explicitly set: title 24pt, ylabel 20pt, ticks 16pt, formation labels 16pt, age labels 16pt. All clearly readable.
  • VQ-02: No Overlap (6/6) — No overlapping text. Formation names and age labels are well-spaced.
  • VQ-03: Element Visibility (5/6) — Hatch patterns are distinct and visible. The conglomerate 'ooo' pattern is slightly dense but still distinguishable.
  • VQ-04: Color Accessibility (4/4) — Earthy palette with good contrast between lithology types. No red-green confusion. Colors are well-differentiated.
  • VQ-05: Layout & Canvas (4/4) — Tall portrait layout (12×16) is ideal for a stratigraphic column. Column fills the vertical space well with balanced margins.
  • VQ-06: Axis Labels & Title (2/2) — Y-axis labeled "Depth (m)" with units. X-axis appropriately removed.

Design Excellence (15/20)

  • DE-01: Aesthetic Sophistication (6/8) — Custom earthy color palette appropriate for geology, distinct hatch patterns approximating FGDC conventions, age-group background shading adds subtle depth. Clearly above defaults.
  • DE-02: Visual Refinement (5/6) — Three spines removed, subtle dashed grid at α=0.12, legend with shadow and rounded box, clean whitespace. Well-polished.
  • DE-03: Data Storytelling (4/6) — The red wavy unconformity line creates a clear focal point representing a major geological event. Age brackets guide the reader through time periods. The sequence tells a geological story.

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) — Correct vertical column visualization with stacked rectangular blocks filled with lithology patterns.
  • SC-02: Required Features (4/4) — All features present: 5 distinct lithology patterns, formation names on right, age labels on left with brackets, depth scale, solid layer boundaries, wavy unconformity line.
  • SC-03: Data Mapping (3/3) — Depth increases downward as specified for borehole convention. All layers correctly positioned.
  • SC-04: Title & Legend (3/3) — Title "column-stratigraphic · matplotlib · pyplots.ai" in correct format. Legend shows all 5 lithology types with correct labels.

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6) — 10 layers spanning 5 lithology types, varying thicknesses (12–25m), multiple geological periods, unconformity surface. Demonstrates all aspects of a stratigraphic column.
  • DQ-02: Realistic Context (5/5) — Uses real US Great Plains geological formations (Ogallala, Arikaree, Niobrara, Dakota, Morrison, Entrada) with correct geological ages and stratigraphic order.
  • DQ-03: Appropriate Scale (4/4) — 0–200m depth range is realistic for a borehole. Layer thicknesses vary realistically. Age assignments are geologically correct.

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) — Clean linear structure: imports → data → plot → save. No functions or classes.
  • CQ-02: Reproducibility (2/2) — Fully deterministic data (no random generation).
  • CQ-03: Clean Imports (2/2) — All imports used: matplotlib.patches, matplotlib.pyplot, numpy.
  • CQ-04: Code Elegance (2/2) — Clean and appropriate complexity. Loop-based drawing of layers and age brackets avoids repetition. No fake UI.
  • CQ-05: Output & API (1/1) — Saves as plot.png with dpi=300, bbox_inches='tight'. No deprecated API usage.

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5) — Uses axes methods throughout. FancyBboxPatch for layer rendering is the correct approach given no high-level API exists for stratigraphic columns. Proper use of zorder for layering.
  • LM-02: Distinctive Features (3/5) — Leverages matplotlib's distinctive hatch pattern system, FancyBboxPatch for styled rectangles, clip_on=False for bracket annotations beyond axes, and custom legend construction with mpatches.Patch handles.

Score Caps Applied

  • None

Strengths

  • Geologically accurate data using real US Great Plains formations with correct stratigraphic order
  • Five distinct lithology patterns with appropriate earthy colors approximating geological conventions
  • Well-executed unconformity wavy line as a visual focal point
  • Clean age bracket system with italic labels on the left side
  • Subtle age-group background shading adds depth without cluttering
  • All font sizes explicitly set and readable

Weaknesses

  • Conglomerate 'ooo' hatch pattern could be slightly less dense for better visibility at smaller scales

Issues Found

No significant issues found.

AI Feedback for Next Attempt

N/A — implementation meets quality threshold.

Verdict: APPROVED

@github-actions github-actions Bot added quality:91 Quality score 91/100 ai-approved Quality OK, ready for merge labels Mar 15, 2026
@github-actions github-actions Bot merged commit 6004102 into main Mar 15, 2026
3 checks passed
@github-actions github-actions Bot deleted the implementation/column-stratigraphic/matplotlib branch March 15, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-approved Quality OK, ready for merge ai-attempt-1 First repair attempt quality:87 Quality score 87/100 quality:91 Quality score 91/100

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants