Skip to content

Commit d3f0a70

Browse files
chore(plotnine): update quality score 83 and review feedback for stereonet-equal-area
1 parent 0a06462 commit d3f0a70

2 files changed

Lines changed: 81 additions & 73 deletions

File tree

plots/stereonet-equal-area/implementations/plotnine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"""pyplots.ai
1+
""" pyplots.ai
22
stereonet-equal-area: Structural Geology Stereonet (Equal-Area Projection)
33
Library: plotnine 0.15.3 | Python 3.14.3
4-
Quality: 79/100 | Created: 2026-03-15
4+
Quality: 83/100 | Created: 2026-03-15
55
"""
66

77
import matplotlib
Lines changed: 79 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library: plotnine
22
specification_id: stereonet-equal-area
33
created: '2026-03-15T22:58:28Z'
4-
updated: '2026-03-15T23:09:34Z'
4+
updated: '2026-03-15T23:17:05Z'
55
generated_by: claude-opus-4-5-20251101
66
workflow_run: 23121188785
77
issue: 4576
@@ -10,99 +10,103 @@ library_version: 0.15.3
1010
preview_url: https://storage.googleapis.com/pyplots-images/plots/stereonet-equal-area/plotnine/plot.png
1111
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/stereonet-equal-area/plotnine/plot_thumb.png
1212
preview_html: null
13-
quality_score: 79
13+
quality_score: 83
1414
review:
1515
strengths:
1616
- Mathematically correct equal-area projection with proper pole and great circle
17-
computations
18-
- Excellent data quality with realistic geological measurements and three well-separated
19-
feature types
20-
- Clean visual design with all unnecessary chrome removed and colorblind-safe palette
21-
with shape redundancy
22-
- Kamb-style density contours properly computed and displayed
17+
calculations
18+
- Excellent colorblind-safe palette with redundant shape encoding for accessibility
19+
- Clean visual design with removed axes, subtle grid, and well-placed cardinal labels
20+
- Cluster annotations provide useful geological context (mean strike/dip)
21+
- Good use of plotnine grammar of graphics with multiple layered geoms
2322
weaknesses:
24-
- Missing stereonet grid lines (equal-area net) required by spec
25-
- Degree labels (30deg, 60deg, etc.) are too small at size=10 and nearly invisible
26-
- Great circle computation is verbose — could be more concise
27-
- No distinctive plotnine features used beyond basic grammar of graphics
28-
image_description: 'The plot shows a Schmidt equal-area (lower-hemisphere) stereonet
29-
projection with a bold primitive circle and tick marks every 10 degrees around
30-
the perimeter. Cardinal directions (N, E, S, W) are labeled in bold at the four
31-
poles. Three geological feature types are plotted: Bedding (blue circles), Fault
32-
(pink/salmon diamonds), and Joint (green squares). Poles to planes are shown as
33-
colored scatter points clustered in three distinct groups — Joints cluster in
34-
the NNE quadrant, Bedding poles cluster in the SSE quadrant, and Fault poles cluster
35-
in the WSW quadrant. Great circles (curved lines) are drawn for representative
36-
planes of each type, color-coded to match. Dashed gray contour lines (Kamb-style
37-
density) surround the pole clusters. Degree labels at 30-degree intervals are
38-
present but very faint. The legend (Feature Type) is positioned to the right outside
39-
the circle. The title reads stereonet-equal-area · plotnine · pyplots.ai at the
40-
top.'
23+
- Cluster annotations overlap with data points, reducing readability
24+
- Density contours use 2D KDE rather than true Kamb contouring method
25+
- Some wasted whitespace at bottom of canvas
26+
image_description: 'The plot displays a structural geology stereonet using the Schmidt
27+
equal-area (lower-hemisphere) projection. A black primitive circle represents
28+
the horizontal plane with N, E, S, W cardinal direction labels in bold and degree
29+
labels every 30° around the perimeter. Three geological feature types are plotted:
30+
Bedding (blue circles, clustered in the SE quadrant), Fault (gold/amber diamonds,
31+
clustered in the SW quadrant), and Joint (purple squares, clustered in the N/NW
32+
quadrant). Great circles are drawn in corresponding colors for representative
33+
planes of each type. Dashed gray density contours (2D KDE) surround each pole
34+
cluster. Subtle light gray grid lines show concentric equal-area circles at 30°
35+
dip intervals and radial lines at 30° azimuth intervals. Italic annotations near
36+
each cluster show mean strike/dip values. The legend is positioned to the right
37+
of the stereonet. The title reads "stereonet-equal-area · plotnine · pyplots.ai".
38+
The figure uses a 1:1 aspect ratio (3600x3600 px).'
4139
criteria_checklist:
4240
visual_quality:
4341
score: 25
4442
max: 30
4543
items:
4644
- id: VQ-01
4745
name: Text Legibility
48-
score: 6
46+
score: 7
4947
max: 8
5048
passed: true
51-
comment: Title and cardinal labels clear; degree labels at size=10 too small
49+
comment: 'Font sizes explicitly set: title 24pt, cardinal labels 18pt, degree
50+
labels 13pt, legend 16/14pt. All readable.'
5251
- id: VQ-02
5352
name: No Overlap
54-
score: 6
53+
score: 4
5554
max: 6
56-
passed: true
57-
comment: No overlapping text or data elements
55+
passed: false
56+
comment: Cluster annotations overlap with data points, reducing readability
57+
of labels.
5858
- id: VQ-03
5959
name: Element Visibility
6060
score: 5
6161
max: 6
6262
passed: true
63-
comment: Poles well-sized, great circles visible, contours could be more prominent
63+
comment: Poles well-sized with distinct shapes. Great circles and density
64+
contours visible. Grid appropriately subtle.
6465
- id: VQ-04
6566
name: Color Accessibility
66-
score: 3
67+
score: 4
6768
max: 4
6869
passed: true
69-
comment: Colorblind-safe palette with shape redundancy; fault color renders
70-
pinkish
70+
comment: Colorblind-safe blue/amber/purple palette with redundant shape encoding.
7171
- id: VQ-05
7272
name: Layout & Canvas
7373
score: 3
7474
max: 4
7575
passed: true
76-
comment: Good canvas utilization; some empty space below circle
76+
comment: Square figure, stereonet well-centered, some wasted whitespace at
77+
bottom.
7778
- id: VQ-06
7879
name: Axis Labels & Title
7980
score: 2
8081
max: 2
8182
passed: true
82-
comment: Axes correctly hidden; cardinal directions serve as labels
83+
comment: Axes hidden (appropriate for stereonet). Cardinal directions and
84+
degree labels serve as orientation.
8385
design_excellence:
84-
score: 12
86+
score: 13
8587
max: 20
8688
items:
8789
- id: DE-01
8890
name: Aesthetic Sophistication
8991
score: 5
9092
max: 8
9193
passed: true
92-
comment: Custom palette, clean chrome removal, above defaults but not exceptional
94+
comment: Custom color palette with good harmony, different marker shapes,
95+
clean stereonet design.
9396
- id: DE-02
9497
name: Visual Refinement
9598
score: 4
9699
max: 6
97100
passed: true
98-
comment: All panel elements removed, subtle dashed contours, clean background
101+
comment: Axes/spines/backgrounds removed. Grid subtle. Tick marks clean. Good
102+
refinement.
99103
- id: DE-03
100104
name: Data Storytelling
101-
score: 3
105+
score: 4
102106
max: 6
103107
passed: true
104-
comment: Clear spatial clustering visible; density contours help; no annotation
105-
of clusters
108+
comment: Cluster annotations with mean strike/dip, distinct color/shape encoding,
109+
density contours reinforce patterns.
106110
spec_compliance:
107111
score: 14
108112
max: 15
@@ -112,111 +116,115 @@ review:
112116
score: 5
113117
max: 5
114118
passed: true
115-
comment: Correct lower-hemisphere equal-area stereonet
119+
comment: Correct equal-area Schmidt net lower-hemisphere projection.
116120
- id: SC-02
117121
name: Required Features
118122
score: 3
119123
max: 4
120124
passed: true
121-
comment: Missing equal-area net grid lines
125+
comment: All features present. Density contours use 2D KDE approximation rather
126+
than true Kamb method.
122127
- id: SC-03
123128
name: Data Mapping
124129
score: 3
125130
max: 3
126131
passed: true
127-
comment: Strike/dip correctly projected
132+
comment: Strike/dip correctly converted to equal-area projection coordinates.
128133
- id: SC-04
129134
name: Title & Legend
130135
score: 3
131136
max: 3
132137
passed: true
133-
comment: Correct title format and legend labels
138+
comment: Title format correct. Legend shows all three feature types with matching
139+
colors and shapes.
134140
data_quality:
135-
score: 15
141+
score: 14
136142
max: 15
137143
items:
138144
- id: DQ-01
139145
name: Feature Coverage
140-
score: 6
146+
score: 5
141147
max: 6
142148
passed: true
143-
comment: Three feature types with distinct orientations, great circles, poles,
144-
and density contours
149+
comment: Three distinct feature types with different orientation distributions.
150+
Great circles for representative planes.
145151
- id: DQ-02
146152
name: Realistic Context
147153
score: 5
148154
max: 5
149155
passed: true
150-
comment: Realistic geological field measurements
156+
comment: Realistic geological field measurements with proper strike/dip conventions.
151157
- id: DQ-03
152158
name: Appropriate Scale
153159
score: 4
154160
max: 4
155161
passed: true
156-
comment: Strike and dip values realistic for each feature type
162+
comment: Realistic strike/dip values for bedding, faults, and joints.
157163
code_quality:
158-
score: 9
164+
score: 10
159165
max: 10
160166
items:
161167
- id: CQ-01
162168
name: KISS Structure
163169
score: 3
164170
max: 3
165171
passed: true
166-
comment: Linear flow, no functions or classes
172+
comment: Clean linear flow with no functions or classes.
167173
- id: CQ-02
168174
name: Reproducibility
169175
score: 2
170176
max: 2
171177
passed: true
172-
comment: np.random.seed(42) set
178+
comment: np.random.seed(42) set.
173179
- id: CQ-03
174180
name: Clean Imports
175181
score: 2
176182
max: 2
177183
passed: true
178-
comment: All imports used
184+
comment: All imports used.
179185
- id: CQ-04
180186
name: Code Elegance
181-
score: 1
187+
score: 2
182188
max: 2
183189
passed: true
184-
comment: Great circle loop verbose; matplotlib contour extraction adds complexity
190+
comment: Appropriate complexity for stereonet calculations. No over-engineering.
185191
- id: CQ-05
186192
name: Output & API
187193
score: 1
188194
max: 1
189195
passed: true
190-
comment: Saves as plot.png
196+
comment: Saves as plot.png using current plotnine API.
191197
library_mastery:
192-
score: 4
198+
score: 7
193199
max: 10
194200
items:
195201
- id: LM-01
196202
name: Idiomatic Usage
197-
score: 3
203+
score: 4
198204
max: 5
199205
passed: true
200-
comment: Proper grammar of graphics with layered geoms and aes mappings
206+
comment: Good grammar of graphics usage with multiple geom layers, aes mappings,
207+
scales, and theme customization.
201208
- id: LM-02
202209
name: Distinctive Features
203-
score: 1
210+
score: 3
204211
max: 5
205-
passed: false
206-
comment: Generic usage; no distinctive plotnine features leveraged
207-
verdict: REJECTED
212+
passed: true
213+
comment: Uses geom_density_2d with after_stat for alpha mapping, layer composition,
214+
and guides control.
215+
verdict: APPROVED
208216
impl_tags:
209-
dependencies:
210-
- scipy
217+
dependencies: []
211218
techniques:
212219
- polar-projection
213-
- layer-composition
214220
- annotations
221+
- layer-composition
222+
- manual-ticks
215223
patterns:
216224
- data-generation
217225
- iteration-over-groups
218-
dataprep:
219-
- kde
226+
dataprep: []
220227
styling:
221228
- minimal-chrome
222229
- alpha-blending
230+
- grid-styling

0 commit comments

Comments
 (0)