Skip to content

Commit 20bff0b

Browse files
feat(highcharts): implement ecdf-basic (#5361)
## Implementation: `ecdf-basic` - python/highcharts Implements the **python/highcharts** version of `ecdf-basic`. **File:** `plots/ecdf-basic/implementations/python/highcharts.py` **Parent Issue:** #976 --- :robot: *[impl-generate workflow](https://github.com/MarkusNeusinger/anyplot/actions/runs/24891235470)* --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 31cee04 commit 20bff0b

2 files changed

Lines changed: 168 additions & 132 deletions

File tree

plots/ecdf-basic/implementations/python/highcharts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
""" pyplots.ai
1+
""" anyplot.ai
22
ecdf-basic: Basic ECDF Plot
3-
Library: highcharts unknown | Python 3.13.11
4-
Quality: 91/100 | Created: 2025-12-23
3+
Library: highcharts unknown | Python 3.14.4
4+
Quality: 86/100 | Updated: 2026-04-24
55
"""
66

77
import tempfile
Lines changed: 165 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,186 @@
11
library: highcharts
2+
language: python
23
specification_id: ecdf-basic
34
created: '2025-12-23T13:03:27Z'
4-
updated: '2025-12-23T13:13:24Z'
5-
generated_by: claude-opus-4-5-20251101
6-
workflow_run: 20461377008
7-
issue: 0
8-
python_version: 3.13.11
5+
updated: '2026-04-24T13:28:11Z'
6+
generated_by: claude-opus
7+
workflow_run: 24891235470
8+
issue: 976
9+
python_version: 3.14.4
910
library_version: unknown
10-
preview_url: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/highcharts/plot.png
11-
preview_html: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/highcharts/plot.html
12-
quality_score: 91
13-
impl_tags:
14-
dependencies:
15-
- selenium
16-
techniques:
17-
- html-export
18-
- grid-styling
19-
patterns:
20-
- data-generation
21-
dataprep: []
22-
styling: []
11+
preview_url_light: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/highcharts/plot-light.png
12+
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/highcharts/plot-dark.png
13+
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/highcharts/plot-light.html
14+
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/highcharts/plot-dark.html
15+
quality_score: 86
2316
review:
2417
strengths:
25-
- Correct ECDF implementation with step=left creating proper vertical jumps at each
26-
data point
27-
- Excellent text legibility with appropriately scaled fonts for 4800x2700 resolution
28-
- Clean, professional appearance with subtle dashed grid lines
29-
- Proper Y-axis range from 0 to 1 as required for cumulative proportion
30-
- Both PNG and HTML outputs generated for static and interactive viewing
31-
- Follows library-specific guidelines for Selenium-based PNG export
18+
- 'Perfect spec compliance: correct ECDF step function with Y-axis 0-1, grid lines,
19+
and distinct line style (15/15).'
20+
- 'Excellent data quality: real-world API response time scenario with 220 samples
21+
and realistic 0-620ms range (15/15).'
22+
- 'Correct theme adaptation: both renders have proper backgrounds (#FAF8F1 / #1A1A17),
23+
adaptive chrome, and identical #009E73 data color across themes.'
24+
- 'Informative subtitle adds context: Empirical cumulative distribution across 220
25+
sampled requests.'
26+
- 'Correct output artifacts: themed PNG and HTML files generated for both light
27+
and dark modes.'
3228
weaknesses:
33-
- Legend positioned at bottom center could be repositioned to avoid overlap with
34-
x-axis label
35-
- Axis labels lack units (e.g., Value (units) would be more descriptive)
36-
- Data uses a simple normal distribution; a slightly more interesting distribution
37-
would better demonstrate ECDF capabilities
38-
image_description: The plot displays an ECDF (Empirical Cumulative Distribution
39-
Function) step chart on a white background. The title "ecdf-basic · highcharts
40-
· pyplots.ai" is prominently displayed at the top in bold black text. The X-axis
41-
is labeled "Value" and ranges from approximately 10 to 86, representing the sample
42-
values from a normal distribution. The Y-axis is labeled "Cumulative Proportion"
43-
and correctly ranges from 0 to 1. The ECDF is rendered as a blue (#306998 Python
44-
Blue) step function line that rises from left to right in a characteristic S-curve
45-
shape typical of normally distributed data. Dashed gray grid lines are present
46-
on both axes to aid in reading values. A legend showing "ECDF" appears at the
47-
bottom center. The chart uses the step="left" configuration, creating proper vertical
48-
jumps at each data point.
29+
- 'All four spines form a box frame — style guide requires removing top and right
30+
spines (L-shaped frame). Set lineWidth: 0 or lineColor: transparent on the top/right
31+
axis equivalents.'
32+
- No percentile reference lines (p50, p90, p95) or annotations — add Highcharts
33+
plotLines on the Y-axis with labels showing both percentile name and x-intercept
34+
value (e.g., p90 = 312 ms).
35+
- Top margin is slightly tight — Y-axis tick label 1 crowds the top border; increase
36+
spacingTop or marginTop in chart options.
37+
image_description: |-
38+
Light render (plot-light.png):
39+
Background: Warm off-white approximately #FAF8F1 — correct light theme surface, not pure white.
40+
Chrome: Title "API Response Times · ecdf-basic · highcharts · anyplot.ai" bold dark text clearly readable. Subtitle "Empirical cumulative distribution across 220 sampled requests" in smaller dark text, readable. X-axis label "Response Time (ms)" and Y-axis label "Cumulative Proportion" both in dark text with units. Tick labels (0, 0.2, 0.4, 0.6, 0.8, 1 on Y; 0-600 on X) are visible; the "1" tick at the top Y-axis edge is slightly crowded against the top border. Subtle horizontal grid lines visible. Full box frame (all 4 spines).
41+
Data: ECDF step function in #009E73 brand green. Step function rises steeply through 0-200ms (most API responses) then plateaus toward 1.0 for the remaining tail up to ~620ms.
42+
Legibility verdict: PASS — all text is dark on light background with no light-on-light failures.
43+
44+
Dark render (plot-dark.png):
45+
Background: Near-black approximately #1A1A17 — correct dark theme surface, not pure black.
46+
Chrome: Title, subtitle, axis labels, and tick labels all flip to light/near-white text, clearly readable against the dark surface. Grid lines are subtle lighter lines visible on dark background. No dark-on-dark failures detected anywhere.
47+
Data: ECDF step function in #009E73 brand green — identical color to the light render. Data colors unchanged between themes as required.
48+
Legibility verdict: PASS — all text is light on dark background with no dark-on-dark failures.
4949
criteria_checklist:
5050
visual_quality:
51-
score: 36
52-
max: 40
51+
score: 28
52+
max: 30
5353
items:
5454
- id: VQ-01
5555
name: Text Legibility
56-
score: 10
57-
max: 10
56+
score: 7
57+
max: 8
5858
passed: true
59-
comment: Title at 72px, axis labels at 48px, tick labels at 36px - all perfectly
60-
readable at 4800x2700
59+
comment: Title, subtitle, axis labels, tick labels all explicitly sized and
60+
readable in both themes; slight deduction for y=1 tick crowding top border
6161
- id: VQ-02
6262
name: No Overlap
63-
score: 8
64-
max: 8
63+
score: 6
64+
max: 6
6565
passed: true
66-
comment: No overlapping text elements
66+
comment: No overlapping text or chart elements
6767
- id: VQ-03
6868
name: Element Visibility
69-
score: 7
70-
max: 8
69+
score: 6
70+
max: 6
7171
passed: true
72-
comment: Line width of 6px is good for the step function, markers disabled
73-
as appropriate for ECDF
72+
comment: ECDF step line perfectly visible and appropriately weighted in both
73+
renders
7474
- id: VQ-04
7575
name: Color Accessibility
76-
score: 5
77-
max: 5
76+
score: 2
77+
max: 2
7878
passed: true
79-
comment: Single blue color (#306998) with good contrast against white background
79+
comment: 'Single series in #009E73 (Okabe-Ito position 1), CVD-safe with strong
80+
contrast'
8081
- id: VQ-05
81-
name: Layout Balance
82-
score: 4
83-
max: 5
82+
name: Layout & Canvas
83+
score: 3
84+
max: 4
8485
passed: true
85-
comment: Good proportions, adequate margins; plot fills canvas well but legend
86-
position at bottom center is slightly awkward
86+
comment: Good canvas utilization; minor deduction for y=1 tick crowding top
87+
border (tight top margin)
8788
- id: VQ-06
88-
name: Axis Labels
89-
score: 1
89+
name: Axis Labels & Title
90+
score: 2
9091
max: 2
9192
passed: true
92-
comment: '"Value" and "Cumulative Proportion" are descriptive but lack units'
93+
comment: Response Time (ms) includes units; Cumulative Proportion is descriptive
9394
- id: VQ-07
94-
name: Grid & Legend
95-
score: 1
95+
name: Palette Compliance
96+
score: 2
9697
max: 2
9798
passed: true
98-
comment: Grid is subtle with dashed style and 0.15 alpha, but legend placement
99-
at bottom overlaps slightly with x-axis label area
99+
comment: 'First series is #009E73; light background warm off-white; dark background
100+
near-black; chrome adapts correctly'
101+
design_excellence:
102+
score: 11
103+
max: 20
104+
items:
105+
- id: DE-01
106+
name: Aesthetic Sophistication
107+
score: 5
108+
max: 8
109+
passed: true
110+
comment: 'Above default: brand green, informative subtitle, clean rendering.
111+
Below 6 due to box frame and no distinctive design choices beyond color.'
112+
- id: DE-02
113+
name: Visual Refinement
114+
score: 3
115+
max: 6
116+
passed: false
117+
comment: Subtle grid lines are appropriate; however all 4 spines retained
118+
— style guide requires removing top and right spines for L-shaped frame
119+
- id: DE-03
120+
name: Data Storytelling
121+
score: 3
122+
max: 6
123+
passed: false
124+
comment: Informative subtitle adds context; real-world scenario is compelling.
125+
No percentile reference lines (p50, p90, p95) to guide interpretation of
126+
key distribution insights.
100127
spec_compliance:
101-
score: 25
102-
max: 25
128+
score: 15
129+
max: 15
103130
items:
104131
- id: SC-01
105132
name: Plot Type
106-
score: 8
107-
max: 8
108-
passed: true
109-
comment: Correct ECDF step chart
110-
- id: SC-02
111-
name: Data Mapping
112133
score: 5
113134
max: 5
114135
passed: true
115-
comment: Values on X-axis, cumulative proportion on Y-axis correctly
116-
- id: SC-03
136+
comment: Correct ECDF step function chart; step rises by 1/n at each data
137+
point
138+
- id: SC-02
117139
name: Required Features
118-
score: 5
119-
max: 5
140+
score: 4
141+
max: 4
120142
passed: true
121-
comment: Step function increases by 1/n at each point, y-axis 0-1, grid lines
122-
present
123-
- id: SC-04
124-
name: Data Range
143+
comment: Step function, Y-axis 0-1, grid lines for percentile reading, distinct
144+
line style — all present
145+
- id: SC-03
146+
name: Data Mapping
125147
score: 3
126148
max: 3
127149
passed: true
128-
comment: Y-axis correctly fixed at 0-1, X-axis shows full data range
129-
- id: SC-05
130-
name: Legend Accuracy
131-
score: 2
132-
max: 2
133-
passed: true
134-
comment: Legend label "ECDF" is accurate
135-
- id: SC-06
136-
name: Title Format
137-
score: 2
138-
max: 2
150+
comment: Values on X (Response Time ms), cumulative proportion on Y (0-1);
151+
full data range visible
152+
- id: SC-04
153+
name: Title & Legend
154+
score: 3
155+
max: 3
139156
passed: true
140-
comment: 'Uses exact format: ecdf-basic · highcharts · pyplots.ai'
157+
comment: Title includes spec-id and library in correct format; no legend appropriate
158+
for single series
141159
data_quality:
142-
score: 17
143-
max: 20
160+
score: 15
161+
max: 15
144162
items:
145163
- id: DQ-01
146164
name: Feature Coverage
147165
score: 6
148-
max: 8
166+
max: 6
149167
passed: true
150-
comment: Shows the characteristic S-curve shape of normal distribution; 150
151-
points is appropriate; could show more interesting distribution features
152-
like asymmetry
168+
comment: Full ECDF from 0 to 1; step function shape shows distribution concentration
169+
and long tail; all 220 points represented
153170
- id: DQ-02
154171
name: Realistic Context
155-
score: 6
156-
max: 7
172+
score: 5
173+
max: 5
157174
passed: true
158-
comment: Normal distribution with mean 50, std 15 is a reasonable example
159-
but quite generic
175+
comment: API response time data for a web service is real-world, neutral,
176+
technically credible
160177
- id: DQ-03
161178
name: Appropriate Scale
162-
score: 5
163-
max: 5
179+
score: 4
180+
max: 4
164181
passed: true
165-
comment: Values between ~10-86 are sensible for the chosen parameters
182+
comment: Response times 0-620ms for 220 sampled requests is highly realistic
183+
for a web API endpoint
166184
code_quality:
167185
score: 10
168186
max: 10
@@ -172,40 +190,58 @@ review:
172190
score: 3
173191
max: 3
174192
passed: true
175-
comment: Clean imports data → plot → save structure, no unnecessary functions/classes
193+
comment: 'Flat script: imports -> data generation -> chart config -> export'
176194
- id: CQ-02
177195
name: Reproducibility
178-
score: 3
179-
max: 3
196+
score: 2
197+
max: 2
180198
passed: true
181-
comment: np.random.seed(42) ensures reproducibility
199+
comment: Random seed set for deterministic data generation
182200
- id: CQ-03
183201
name: Clean Imports
184202
score: 2
185203
max: 2
186204
passed: true
187-
comment: All imports are used
205+
comment: Imports limited to what is used
188206
- id: CQ-04
189-
name: No Deprecated API
190-
score: 1
191-
max: 1
207+
name: Code Elegance
208+
score: 2
209+
max: 2
192210
passed: true
193-
comment: Uses current highcharts-core API
211+
comment: Clean step data construction; no fake UI elements; no over-engineering
194212
- id: CQ-05
195-
name: Output Correct
213+
name: Output & API
196214
score: 1
197215
max: 1
198216
passed: true
199-
comment: Saves as plot.png and plot.html
200-
library_features:
201-
score: 3
202-
max: 5
217+
comment: plot-light.png, plot-dark.png, plot-light.html, plot-dark.html all
218+
confirmed in output
219+
library_mastery:
220+
score: 7
221+
max: 10
203222
items:
204-
- id: LF-01
205-
name: Uses distinctive library features
223+
- id: LM-01
224+
name: Idiomatic Usage
225+
score: 4
226+
max: 5
227+
passed: true
228+
comment: Correct Chart(container=container), HighchartsOptions, LineSeries,
229+
inline JS for headless Chrome, Selenium screenshot — above default pattern
230+
- id: LM-02
231+
name: Distinctive Features
206232
score: 3
207233
max: 5
208234
passed: true
209-
comment: Uses Highcharts step line chart with proper configuration; could
210-
leverage more interactive features like tooltips or zoom for HTML version
211-
verdict: APPROVED
235+
comment: 'Highcharts-specific step: left parameter for step function; interactive
236+
HTML with hover tooltips as native Highcharts feature. No advanced features
237+
like custom tooltip formatters or responsive rules.'
238+
verdict: REJECTED
239+
impl_tags:
240+
dependencies:
241+
- selenium
242+
techniques:
243+
- html-export
244+
patterns:
245+
- data-generation
246+
dataprep: []
247+
styling: []

0 commit comments

Comments
 (0)