Skip to content

Commit c052e0e

Browse files
feat(plotly): implement box-basic (#1361)
## Implementation: `box-basic` - plotly Implements the **plotly** version of `box-basic`. **File:** `plots/box-basic/implementations/plotly.py` --- :robot: *[impl-generate workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20447776078)* --------- 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 0146c97 commit c052e0e

2 files changed

Lines changed: 22 additions & 11 deletions

File tree

plots/box-basic/implementations/plotly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
""" pyplots.ai
22
box-basic: Basic Box Plot
33
Library: plotly 6.5.0 | Python 3.13.11
4-
Quality: 100/100 | Created: 2025-12-14
4+
Quality: 91/100 | Created: 2025-12-23
55
"""
66

77
import numpy as np
@@ -13,11 +13,11 @@
1313
categories = ["Engineering", "Marketing", "Sales", "HR", "Finance"]
1414
colors = ["#306998", "#FFD43B", "#4B8BBE", "#FFE873", "#646464"]
1515

16-
# Generate realistic salary data for each department
16+
# Generate realistic salary data for each department with varying distributions
1717
data = {
1818
"Engineering": np.random.normal(95000, 15000, 100),
1919
"Marketing": np.random.normal(75000, 12000, 80),
20-
"Sales": np.random.normal(70000, 20000, 120),
20+
"Sales": np.random.normal(70000, 20000, 120), # Higher variance for more outliers
2121
"HR": np.random.normal(65000, 10000, 60),
2222
"Finance": np.random.normal(85000, 14000, 90),
2323
}
Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
library: plotly
22
specification_id: box-basic
3-
created: 2025-12-14 09:03:27+00:00
4-
updated: 2025-12-14 09:03:27+00:00
3+
created: '2025-12-23T00:35:23Z'
4+
updated: '2025-12-23T00:38:11Z'
55
generated_by: claude-opus-4-5-20251101
6-
workflow_run: 20205607260
7-
issue: 689
6+
workflow_run: 20447776078
7+
issue: 0
88
python_version: 3.13.11
99
library_version: 6.5.0
1010
preview_url: https://storage.googleapis.com/pyplots-images/plots/box-basic/plotly/plot.png
1111
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/box-basic/plotly/plot_thumb.png
1212
preview_html: https://storage.googleapis.com/pyplots-images/plots/box-basic/plotly/plot.html
13-
quality_score: 100
13+
quality_score: 91
1414
review:
15-
strengths: []
16-
weaknesses: []
17-
improvements: []
15+
strengths:
16+
- Excellent text sizing with title at 32pt and axis labels at 24pt for high readability
17+
at 4800x2700
18+
- Clean, professional appearance with plotly_white template
19+
- Well-chosen realistic scenario (salary distributions by department) that demonstrates
20+
box plot features
21+
- Good feature coverage showing outliers, varying medians, and different distribution
22+
spreads
23+
- Proper dollar formatting on Y-axis with tickformat
24+
- Generates both PNG and HTML outputs for interactivity
25+
weaknesses:
26+
- The $5k outlier in Sales is unrealistically low for annual salary data
27+
- Does not leverage Plotly-specific features like custom hover templates or quartile
28+
annotations

0 commit comments

Comments
 (0)