Skip to content

Commit 22ac3fb

Browse files
chore(plotly): update quality score 93 and review feedback for bar-stacked
1 parent b44042f commit 22ac3fb

2 files changed

Lines changed: 76 additions & 75 deletions

File tree

plots/bar-stacked/implementations/python/plotly.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"""anyplot.ai
1+
""" anyplot.ai
22
bar-stacked: Stacked Bar Chart
33
Library: plotly 6.7.0 | Python 3.13.13
4-
Quality: 89/100 | Updated: 2026-05-09
4+
Quality: 93/100 | Updated: 2026-05-09
55
"""
66

77
import os

plots/bar-stacked/metadata/python/plotly.yaml

Lines changed: 74 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library: plotly
22
language: python
33
specification_id: bar-stacked
44
created: '2025-12-26T10:04:11Z'
5-
updated: '2026-05-09T07:04:15Z'
5+
updated: '2026-05-09T07:11:10Z'
66
generated_by: claude-haiku
77
workflow_run: 25594734391
88
issue: 1947
@@ -12,36 +12,36 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/bar-stack
1212
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/plotly/plot-dark.png
1313
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/plotly/plot-light.html
1414
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/plotly/plot-dark.html
15-
quality_score: 89
15+
quality_score: 93
1616
review:
1717
strengths:
18-
- 'Perfect visual quality: all text explicitly sized and readable in both themes'
19-
- 'Flawless palette compliance: Okabe-Ito colors identical across light/dark with
20-
perfect theme-adaptive chrome'
21-
- 'Excellent spec compliance: correct plot type with all required features and proper
22-
data mapping'
23-
- 'Strong realistic data: business scenario with meaningful growth narrative across
24-
quarters'
25-
- 'Clean, idiomatic code: proper plotly API usage with theme-awareness architecture'
18+
- Perfect visual quality with excellent readability in both light and dark themes
19+
- 'Flawless palette compliance: Okabe-Ito colors identical across themes, theme-appropriate
20+
chrome'
21+
- 'Masterful Plotly usage: custom hover templates, theme-adaptive environment variables,
22+
rich interactive features'
23+
- Realistic, meaningful data showing revenue composition with growth insights
24+
- Clean, maintainable code with clear structure
25+
- All spec requirements met completely
2626
weaknesses:
27-
- 'Design Excellence below publication-ready tier (12/20): lacks visual sophistication
28-
beyond well-configured defaults'
29-
- 'No visual hierarchy or emphasis: data displayed straightforwardly without storytelling
30-
technique (color contrast, size variation, focal points)'
31-
- 'Visual refinement adequate but not exceptional: could benefit from more sophisticated
32-
legend styling, enhanced grid treatment, or intentional design emphasis'
27+
- Design Excellence solid but not exceptional—could elevate with more sophisticated
28+
annotation styling or refined visual hierarchy
3329
image_description: |-
3430
Light render (plot-light.png):
35-
Background: Warm off-white (#FAF8F1) - correct theme color
36-
Chrome: Title "bar-stacked · plotly · anyplot.ai" (dark text, 28px), axis labels "Quarter" and "Revenue (Thousands USD)" (dark text with units, 22px), tick labels (dark secondary color, 18px), legend on right with styled background and border
37-
Data: Four stacked components using Okabe-Ito palette - Software (#009E73, green at bottom), Hardware (#D55E00, orange), Services (#0072B2, blue), Support (#CC79A7, reddish purple). Each segment shows value in white text inside bar. Total labels above bars ($270K, $305K, $350K, $390K) in bold dark text (INK token).
38-
Legibility verdict: PASS - all text perfectly readable, no overlaps, strong contrast
31+
Background: Warm off-white (#FAF8F1) as specified
32+
Chrome: Title, axis labels, tick labels are dark (#1A1A17) and perfectly readable against light background
33+
Data: Four stacked components use correct Okabe-Ito colors (Software #009E73 green at base, Hardware #D55E00 orange, Services #0072B2 blue, Support #CC79A7 purple); component values labeled inside with white text for contrast; total annotations above bars with growth rates in light boxes with dark text
34+
Grid: Y-axis grid is subtle and appropriate
35+
Legend: Top-right, light background, dark text, clearly labeled
36+
Legibility verdict: PASS - all text readable with no overlap
3937
4038
Dark render (plot-dark.png):
41-
Background: Warm near-black (#1A1A17) - correct dark theme color
42-
Chrome: Title in light text, axis labels and tick labels in light secondary color (INK_SOFT token), legend with dark background and light text border
43-
Data: Identical colors to light render - Software green, Hardware orange, Services blue, Support pink (only chrome flipped, data colors constant). Segment values white text. Total labels in light text.
44-
Legibility verdict: PASS - all text clearly visible against dark background, no dark-on-dark failures, excellent contrast throughout
39+
Background: Warm near-black (#1A1A17) as specified
40+
Chrome: Title, axis labels, tick labels are light (#F0EFE8 and #B8B7B0) and perfectly readable against dark background; no dark-on-dark failures
41+
Data: Data colors remain IDENTICAL to light render (Software #009E73, Hardware #D55E00, Services #0072B2, Support #CC79A7); component values in white; total annotations use light text on dark boxes
42+
Grid: Y-axis grid is subtle and visible
43+
Legend: Top-right, dark background, light text
44+
Legibility verdict: PASS - all text readable in both renders, theme chrome correctly adapted
4545
criteria_checklist:
4646
visual_quality:
4747
score: 30
@@ -52,72 +52,74 @@ review:
5252
score: 8
5353
max: 8
5454
passed: true
55-
comment: 'All font sizes explicitly set: title 28px, labels 22px, ticks 18px,
56-
data values 18px. All perfectly readable at 4800×2700.'
55+
comment: Title (28px), labels (22px), ticks (18px) all explicitly set and
56+
perfectly readable in both themes
5757
- id: VQ-02
5858
name: No Overlap
5959
score: 6
6060
max: 6
6161
passed: true
62-
comment: No overlapping text elements. All labels fully readable and well-spaced.
62+
comment: No overlapping text; bars have subtle separators; annotations positioned
63+
clearly
6364
- id: VQ-03
6465
name: Element Visibility
6566
score: 6
6667
max: 6
6768
passed: true
68-
comment: Bars and stacked segments clearly visible and optimally sized. Data
69-
labels prominent within segments.
69+
comment: All 16 segments (4 bars × 4 components) clearly distinct and visible
7070
- id: VQ-04
7171
name: Color Accessibility
7272
score: 2
7373
max: 2
7474
passed: true
75-
comment: Okabe-Ito palette is CVD-safe with strong contrast between segments.
75+
comment: Okabe-Ito palette is colorblind-safe; white text has good contrast
76+
on segments
7677
- id: VQ-05
7778
name: Layout & Canvas
7879
score: 4
7980
max: 4
8081
passed: true
81-
comment: Plot occupies 65-70% of canvas with balanced margins and generous
82-
whitespace.
82+
comment: Plot fills 60-70% of canvas with balanced margins; legend and annotations
83+
well-positioned
8384
- id: VQ-06
8485
name: Axis Labels & Title
8586
score: 2
8687
max: 2
8788
passed: true
88-
comment: 'Descriptive with units: ''Quarter'' and ''Revenue (Thousands USD)''.'
89+
comment: Y-axis includes units (Thousands USD); X-axis is descriptive (Quarter)
8990
- id: VQ-07
9091
name: Palette Compliance
9192
score: 2
9293
max: 2
9394
passed: true
94-
comment: 'First series #009E73; Okabe-Ito order followed; backgrounds #FAF8F1
95-
and #1A1A17; text colors theme-correct in both renders.'
95+
comment: 'First series #009E73; subsequent colors follow Okabe-Ito order;
96+
backgrounds correct (#FAF8F1 light, #1A1A17 dark); chrome theme-correct
97+
in both renders'
9698
design_excellence:
97-
score: 12
99+
score: 13
98100
max: 20
99101
items:
100102
- id: DE-01
101103
name: Aesthetic Sophistication
102-
score: 6
104+
score: 5
103105
max: 8
104-
passed: false
105-
comment: Strong design with thoughtful use of theme tokens and styled legend.
106-
Clearly above defaults but lacks publication-ready sophistication.
106+
passed: true
107+
comment: Professional color palette, thoughtful annotations with growth rates,
108+
subtle bar borders. Well-crafted but not extraordinary.
107109
- id: DE-02
108110
name: Visual Refinement
109111
score: 4
110112
max: 6
111-
passed: false
112-
comment: Subtle grid, L-shaped frame (top/right spines removed), generous
113-
whitespace. Good but not exceptional refinement.
113+
passed: true
114+
comment: Subtle Y-axis grid, styled bar edges, generous whitespace, legend
115+
with border/background. Good refinement but could be slightly more polished.
114116
- id: DE-03
115117
name: Data Storytelling
116-
score: 2
118+
score: 4
117119
max: 6
118-
passed: false
119-
comment: Data displayed clearly with visible growth trajectory. No exceptional
120-
visual emphasis or focal point to guide insights.
120+
passed: true
121+
comment: Meaningful data (quarterly revenue composition), annotations emphasize
122+
progression, stacking naturally tells composition story. Good visual hierarchy.
121123
spec_compliance:
122124
score: 15
123125
max: 15
@@ -127,28 +129,25 @@ review:
127129
score: 5
128130
max: 5
129131
passed: true
130-
comment: Correct stacked bar chart with barmode='stack' showing all components
131-
properly stacked.
132+
comment: Correct stacked bar chart; bars properly stacked
132133
- id: SC-02
133134
name: Required Features
134135
score: 4
135136
max: 4
136137
passed: true
137-
comment: 'All features present: multiple series, stacking, legend, total value
138-
annotations.'
138+
comment: All features present and working
139139
- id: SC-03
140140
name: Data Mapping
141141
score: 3
142142
max: 3
143143
passed: true
144-
comment: X-axis (quarters) and Y-axis (revenue) correctly mapped. Axes show
145-
all data.
144+
comment: X=quarters, Y=revenue; axes show all data
146145
- id: SC-04
147146
name: Title & Legend
148147
score: 3
149148
max: 3
150149
passed: true
151-
comment: Title format correct. Legend labels match data series.
150+
comment: Correct format; legend labels correct
152151
data_quality:
153152
score: 15
154153
max: 15
@@ -158,22 +157,20 @@ review:
158157
score: 6
159158
max: 6
160159
passed: true
161-
comment: 'Shows all stacked bar aspects: 4 categories with 4 components each,
162-
varying proportions.'
160+
comment: Shows full composition across quarters with varying component sizes
163161
- id: DQ-02
164162
name: Realistic Context
165163
score: 5
166164
max: 5
167165
passed: true
168-
comment: 'Real business scenario: quarterly revenue by product category. Neutral
169-
and professional.'
166+
comment: Real business scenario (quarterly revenue by product category); neutral
167+
and professional
170168
- id: DQ-03
171169
name: Appropriate Scale
172170
score: 4
173171
max: 4
174172
passed: true
175-
comment: Values plausible and proportionally correct for growing business.
176-
Relationships logical.
173+
comment: Values factually plausible; growth rates realistic; proportions logical
177174
code_quality:
178175
score: 10
179176
max: 10
@@ -183,55 +180,59 @@ review:
183180
score: 3
184181
max: 3
185182
passed: true
186-
comment: 'Clean: imports → theme tokens → data → figure → save. No functions/classes.'
183+
comment: Linear structure; no functions/classes
187184
- id: CQ-02
188185
name: Reproducibility
189186
score: 2
190187
max: 2
191188
passed: true
192-
comment: Hardcoded deterministic data, no randomness.
189+
comment: All data hardcoded and deterministic
193190
- id: CQ-03
194191
name: Clean Imports
195192
score: 2
196193
max: 2
197194
passed: true
198-
comment: Only os and plotly.graph_objects, all used.
195+
comment: Only used imports
199196
- id: CQ-04
200197
name: Code Elegance
201198
score: 2
202199
max: 2
203200
passed: true
204-
comment: Clean, Pythonic, proper plotly API. Idiomatic zip() usage.
201+
comment: Clean, Pythonic; no over-engineering
205202
- id: CQ-05
206203
name: Output & API
207204
score: 1
208205
max: 1
209206
passed: true
210-
comment: Saves as plot-{THEME}.png and plot-{THEME}.html. Current API.
207+
comment: Saves correctly; uses current API
211208
library_mastery:
212-
score: 7
209+
score: 10
213210
max: 10
214211
items:
215212
- id: LM-01
216213
name: Idiomatic Usage
217214
score: 5
218215
max: 5
219216
passed: true
220-
comment: Expertly uses plotly high-level API with proper theme-adaptive styling.
217+
comment: Expert use of go.Figure(), add_trace(), custom hover templates, comprehensive
218+
update_layout()
221219
- id: LM-02
222220
name: Distinctive Features
223-
score: 2
221+
score: 5
224222
max: 5
225-
passed: false
226-
comment: Uses interactive export and annotation system, but not particularly
227-
distinctive to plotly.
228-
verdict: REJECTED
223+
passed: true
224+
comment: Custom hover templates with percentages, theme-adaptive styling,
225+
HTML export, creative annotation styling
226+
verdict: APPROVED
229227
impl_tags:
230228
dependencies: []
231229
techniques:
232230
- annotations
231+
- hover-tooltips
233232
- html-export
234233
patterns:
235234
- data-generation
235+
- iteration-over-groups
236236
dataprep: []
237-
styling: []
237+
styling:
238+
- publication-ready

0 commit comments

Comments
 (0)