-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotnine.yaml
More file actions
239 lines (238 loc) · 8.44 KB
/
plotnine.yaml
File metadata and controls
239 lines (238 loc) · 8.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
library: plotnine
language: python
specification_id: slope-basic
created: '2025-12-23T20:46:08Z'
updated: '2026-04-30T17:15:54Z'
generated_by: claude-sonnet
workflow_run: 25177574844
issue: 981
python_version: 3.13.13
library_version: 0.15.3
preview_url_light: https://storage.googleapis.com/anyplot-images/plots/slope-basic/python/plotnine/plot-light.png
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/slope-basic/python/plotnine/plot-dark.png
preview_html_light: null
preview_html_dark: null
quality_score: 80
review:
strengths:
- Direction color coding using Okabe-Ito colors is excellent storytelling — viewer
immediately reads increases vs decreases
- 'Correct plotnine idiom: long-format data for line geoms, separate DataFrames
passed to geom_text layers'
- Scale and data context are realistic and neutral (product sales Q1 to Q4)
- Both renders pass theme legibility — light and dark chrome adapts correctly, data
colors identical
weaknesses:
- 'Label crowding in the mid-value band (left: Products J/F at 175-180; right: values
165/160/155 within 10 units) — consider nudge_y based on value ranking or reducing
entity count'
- 'Output filename: code saves plot.png instead of plot-{THEME}.png using ANYPLOT_THEME
environment variable'
- Panel border visible as full rectangle in both renders — removing panel_border
would improve visual refinement
image_description: |-
Light render (plot-light.png):
Background: Warm off-white approximately #FAF8F1 — not pure white, consistent with anyplot light theme
Chrome: Title "Product Sales Q1 vs Q4 · slope-basic · plotnine · anyplot.ai" in dark text — readable. Y-axis label "Sales (thousands $)" readable. X-axis tick labels "Q1" and "Q4" readable. All chrome text dark on light background.
Data: 10 slope lines — teal-green (#009E73) for Increase series (first Okabe-Ito color), orange (#D55E00) for Decrease series (second Okabe-Ito color). Left entity labels combine name+value; right labels show Q4 values. Mild crowding in mid-range (Products J/F at 175-180 left; values 165/160/155 right). Lines and dots clearly visible.
Legibility verdict: PASS (minor label crowding but all text individually readable)
Dark render (plot-dark.png):
Background: Warm near-black approximately #1A1A17 — not pure black, consistent with anyplot dark theme
Chrome: Title visible in light text. Axis labels and tick labels rendered in light color — all readable against dark surface. Entity name labels and value labels appear in light text — no dark-on-dark failures detected. Legend text light-colored and readable. Panel border visible as light rectangle frame.
Data: Data colors identical to light render — teal-green for Increase, orange for Decrease. No color shift between themes.
Legibility verdict: PASS
criteria_checklist:
visual_quality:
score: 23
max: 30
items:
- id: VQ-01
name: Text Legibility
score: 6
max: 8
passed: true
comment: Sizes explicitly set (title=24, axis=20, ticks=18, legend=16); geom_text
labels at size=10 are smaller but readable
- id: VQ-02
name: No Overlap
score: 3
max: 6
passed: true
comment: 'Moderate crowding: Products J/F (180/175) nearly touching on left;
right-side values 165/160/155 in tight cluster'
- id: VQ-03
name: Element Visibility
score: 5
max: 6
passed: true
comment: Lines (size=1.5) and points (size=5) clearly visible in both themes
- id: VQ-04
name: Color Accessibility
score: 2
max: 2
passed: true
comment: Okabe-Ito green+orange pair is colorblind-safe with good luminance
contrast
- id: VQ-05
name: Layout & Canvas
score: 3
max: 4
passed: true
comment: 16:9 correct; x-axis limits extended to 0.3-2.7 for label space;
slight cramping
- id: VQ-06
name: Axis Labels & Title
score: 2
max: 2
passed: true
comment: Y-axis includes units (thousands $); X-axis shows Q1/Q4 time point
names
- id: VQ-07
name: Palette Compliance
score: 2
max: 2
passed: true
comment: 'Images confirm Okabe-Ito: #009E73 for Increase (first series), #D55E00
for Decrease. Warm backgrounds in both themes. Text colors theme-adaptive.'
design_excellence:
score: 11
max: 20
items:
- id: DE-01
name: Aesthetic Sophistication
score: 4
max: 8
passed: true
comment: Direction color-coding is deliberate; no spine removal, full panel
border, no additional typographic refinement — well-configured default
- id: DE-02
name: Visual Refinement
score: 3
max: 6
passed: true
comment: X-grid explicitly removed (correct for slope chart); Y-grid subtle;
panel border not removed; top/right spines remain
- id: DE-03
name: Data Storytelling
score: 4
max: 6
passed: true
comment: Direction color-coding creates immediate visual narrative; slope
direction reinforces color signal; mid-range label crowding weakens story
slightly
spec_compliance:
score: 15
max: 15
items:
- id: SC-01
name: Plot Type
score: 5
max: 5
passed: true
comment: 'Correct slopegraph: geom_line connecting two time points per entity'
- id: SC-02
name: Required Features
score: 4
max: 4
passed: true
comment: Labels at both endpoints, color coding by direction, Q1/Q4 axis labels,
10 entities within spec range
- id: SC-03
name: Data Mapping
score: 3
max: 3
passed: true
comment: X encodes time points, Y encodes sales values, all 10 entities visible
- id: SC-04
name: Title & Legend
score: 3
max: 3
passed: true
comment: Title includes slope-basic, plotnine, anyplot.ai; legend shows Change
Direction with correct labels
data_quality:
score: 15
max: 15
items:
- id: DQ-01
name: Feature Coverage
score: 6
max: 6
passed: true
comment: Shows increases, decreases, rank reversals (crossings), various magnitudes
- id: DQ-02
name: Realistic Context
score: 5
max: 5
passed: true
comment: Product sales Q1 vs Q4 is neutral, realistic business scenario
- id: DQ-03
name: Appropriate Scale
score: 4
max: 4
passed: true
comment: Values 65-230 thousands for quarterly product sales are plausible
code_quality:
score: 9
max: 10
items:
- id: CQ-01
name: KISS Structure
score: 3
max: 3
passed: true
comment: 'Clean linear flow: data arrays -> DataFrames -> plot -> save'
- id: CQ-02
name: Reproducibility
score: 2
max: 2
passed: true
comment: Hardcoded deterministic data
- id: CQ-03
name: Clean Imports
score: 2
max: 2
passed: true
comment: All imports used, no extras
- id: CQ-04
name: Code Elegance
score: 2
max: 2
passed: true
comment: Three separate DataFrames for different geom layers is correct ggplot
pattern
- id: CQ-05
name: Output & API
score: 0
max: 1
passed: false
comment: Saves to plot.png instead of plot-{THEME}.png; should read ANYPLOT_THEME
env var
library_mastery:
score: 7
max: 10
items:
- id: LM-01
name: Idiomatic Usage
score: 4
max: 5
passed: true
comment: 'Proper ggplot grammar: long-format data, group aesthetic, scale_color_manual,
scale_x_continuous with custom breaks/labels'
- id: LM-02
name: Distinctive Features
score: 3
max: 5
passed: true
comment: Separate DataFrames per geom layer via data= argument, nudge_x for
label offset, numeric-to-semantic x-axis via scale_x_continuous
verdict: APPROVED
impl_tags:
dependencies: []
techniques:
- layer-composition
patterns:
- wide-to-long
dataprep: []
styling:
- alpha-blending