Skip to content

Commit 8d8bbcc

Browse files
feat(pygal): implement box-basic (#1367)
## Implementation: `box-basic` - pygal Implements the **pygal** version of `box-basic`. **File:** `plots/box-basic/implementations/pygal.py` --- :robot: *[impl-generate workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20447783616)* --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent bd31360 commit 8d8bbcc

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

plots/box-basic/implementations/pygal.py

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

77
import numpy as np
88
import pygal
99
from pygal.style import Style
1010

1111

12-
# Data - Generate distributions for different departments
12+
# Data - Generate salary distributions for different departments
1313
np.random.seed(42)
1414
categories = ["Engineering", "Marketing", "Sales", "Operations", "HR"]
1515
data = {
@@ -20,6 +20,10 @@
2020
"HR": np.random.normal(58000, 8000, 100),
2121
}
2222

23+
# Add some outliers to demonstrate box plot features
24+
data["Engineering"] = np.append(data["Engineering"], [130000, 135000, 40000])
25+
data["Sales"] = np.append(data["Sales"], [120000, 25000])
26+
2327
# Custom style using PyPlots colors
2428
custom_style = Style(
2529
background="white",
@@ -45,9 +49,11 @@
4549
y_title="Salary ($)",
4650
show_legend=True,
4751
legend_at_bottom=True,
52+
legend_box_size=24,
4853
show_y_guides=True,
4954
show_x_guides=False,
5055
margin=50,
56+
box_mode="tukey",
5157
)
5258

5359
# Add data for each category
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
library: pygal
22
specification_id: box-basic
3-
created: 2025-12-14 09:04:02+00:00
4-
updated: 2025-12-14 09:04:02+00:00
3+
created: '2025-12-23T00:36:15Z'
4+
updated: '2025-12-23T00:47:37Z'
55
generated_by: claude-opus-4-5-20251101
6-
workflow_run: 20205608996
7-
issue: 689
6+
workflow_run: 20447783616
7+
issue: 0
88
python_version: 3.13.11
99
library_version: 3.1.0
1010
preview_url: https://storage.googleapis.com/pyplots-images/plots/box-basic/pygal/plot.png
1111
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/box-basic/pygal/plot_thumb.png
1212
preview_html: https://storage.googleapis.com/pyplots-images/plots/box-basic/pygal/plot.html
13-
quality_score: 92
13+
quality_score: 91
1414
review:
15-
strengths: []
16-
weaknesses: []
17-
improvements: []
15+
strengths:
16+
- Excellent data choice with realistic salary distributions across departments
17+
- Proper use of Tukey box mode for standard box plot visualization
18+
- Clean implementation of outliers in Engineering and Sales departments
19+
- Good color palette that is accessible and visually distinct
20+
- Correct title format and proper axis labeling with units
21+
weaknesses:
22+
- Legend box size is small relative to the large chart dimensions, making it less
23+
prominent
24+
- Outlier markers could be slightly larger for better visibility at this resolution

0 commit comments

Comments
 (0)