Skip to content

Commit 7e6343a

Browse files
update(box-basic): pygal — comprehensive quality review and improvement
1 parent 150c632 commit 7e6343a

2 files changed

Lines changed: 25 additions & 18 deletions

File tree

plots/box-basic/implementations/pygal.py

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

77
import numpy as np
@@ -20,40 +20,47 @@
2020
"HR": np.random.normal(58000, 8000, 100),
2121
}
2222

23-
# Add some outliers to demonstrate box plot features
23+
# Add outliers to demonstrate box plot features
2424
data["Engineering"] = np.append(data["Engineering"], [130000, 135000, 40000])
2525
data["Sales"] = np.append(data["Sales"], [120000, 25000])
2626

27-
# Custom style using PyPlots colors
27+
# Custom style scaled for 4800x2700 canvas
2828
custom_style = Style(
2929
background="white",
3030
plot_background="white",
3131
foreground="#333333",
3232
foreground_strong="#333333",
33-
foreground_subtle="#666666",
34-
colors=("#306998", "#FFD43B", "#4CAF50", "#FF5722", "#9C27B0"),
35-
title_font_size=60,
36-
label_font_size=40,
37-
major_label_font_size=36,
38-
legend_font_size=36,
33+
foreground_subtle="#cccccc",
34+
colors=("#306998", "#E69F00", "#009E73", "#D55E00", "#8B5CF6"),
35+
title_font_size=72,
36+
label_font_size=44,
37+
major_label_font_size=40,
38+
legend_font_size=44,
3939
value_font_size=32,
40+
opacity=0.9,
41+
opacity_hover=1.0,
4042
)
4143

4244
# Create box chart
4345
chart = pygal.Box(
4446
width=4800,
4547
height=2700,
4648
style=custom_style,
47-
title="box-basic · pygal · pyplots.ai",
49+
title="box-basic \u00b7 pygal \u00b7 pyplots.ai",
4850
x_title="Department",
4951
y_title="Salary ($)",
5052
show_legend=True,
5153
legend_at_bottom=True,
52-
legend_box_size=24,
54+
legend_at_bottom_columns=5,
55+
legend_box_size=36,
56+
truncate_legend=-1,
57+
truncate_label=-1,
5358
show_y_guides=True,
5459
show_x_guides=False,
55-
margin=50,
60+
margin=60,
61+
spacing=40,
5662
box_mode="tukey",
63+
dots_size=8,
5764
)
5865

5966
# Add data for each category

plots/box-basic/metadata/pygal.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
library: pygal
22
specification_id: box-basic
33
created: '2025-12-23T00:36:15Z'
4-
updated: '2025-12-23T00:47:37Z'
5-
generated_by: claude-opus-4-5-20251101
4+
updated: 2026-02-14T22:09:08+00:00
5+
generated_by: claude-opus-4-6
66
workflow_run: 20447783616
77
issue: 0
8-
python_version: 3.13.11
9-
library_version: 3.1.0
8+
python_version: "3.14"
9+
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: 91
13+
quality_score: null
1414
impl_tags:
1515
dependencies: []
1616
techniques:

0 commit comments

Comments
 (0)