Skip to content

Commit c375942

Browse files
update(density-basic): seaborn — comprehensive quality review
Comprehensive quality review with improved visual design, data quality, and spec compliance.
1 parent 2dd92c8 commit c375942

2 files changed

Lines changed: 17 additions & 19 deletions

File tree

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
11
""" pyplots.ai
22
density-basic: Basic Density Plot
3-
Library: seaborn 0.13.2 | Python 3.13.11
4-
Quality: 93/100 | Created: 2025-12-23
3+
Library: seaborn 0.13.2 | Python 3.14
4+
Quality: /100 | Updated: 2026-02-23
55
"""
66

77
import matplotlib.pyplot as plt
88
import numpy as np
99
import seaborn as sns
1010

1111

12-
# Data - create a realistic bimodal distribution of test scores
12+
# Data - bimodal distribution of test scores
1313
np.random.seed(42)
1414
test_scores = np.concatenate(
1515
[
16-
np.random.normal(72, 10, 300), # Main group centered at 72
17-
np.random.normal(88, 5, 100), # High achievers group
16+
np.random.normal(68, 8, 280), # Main group centered at 68
17+
np.random.normal(90, 4, 120), # High achievers group
1818
]
1919
)
2020

21-
# Create figure
21+
# Plot
2222
fig, ax = plt.subplots(figsize=(16, 9))
23-
24-
# Plot density curve with fill
2523
sns.kdeplot(data=test_scores, ax=ax, fill=True, alpha=0.6, color="#306998", linewidth=3)
26-
27-
# Add rug plot to show individual observations
2824
sns.rugplot(data=test_scores, ax=ax, color="#306998", alpha=0.3, height=0.03)
2925

3026
# Style
3127
ax.set_xlabel("Test Score (points)", fontsize=20)
3228
ax.set_ylabel("Density", fontsize=20)
33-
ax.set_title("density-basic · seaborn · pyplots.ai", fontsize=24)
29+
ax.set_title("density-basic · seaborn · pyplots.ai", fontsize=24, fontweight="medium")
3430
ax.tick_params(axis="both", labelsize=16)
35-
ax.grid(True, alpha=0.3, linestyle="--")
31+
ax.spines["top"].set_visible(False)
32+
ax.spines["right"].set_visible(False)
33+
ax.yaxis.grid(True, alpha=0.2, linewidth=0.8)
3634

3735
plt.tight_layout()
3836
plt.savefig("plot.png", dpi=300, bbox_inches="tight")

plots/density-basic/metadata/seaborn.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
library: seaborn
22
specification_id: density-basic
33
created: '2025-12-23T10:00:16Z'
4-
updated: '2025-12-23T10:02:21Z'
5-
generated_by: claude-opus-4-5-20251101
4+
updated: '2026-02-23T22:38:00+00:00'
5+
generated_by: claude-opus-4-6
66
workflow_run: 20457532266
77
issue: 0
8-
python_version: 3.13.11
8+
python_version: 3.14.3
99
library_version: 0.13.2
1010
preview_url: https://storage.googleapis.com/pyplots-images/plots/density-basic/seaborn/plot.png
1111
preview_thumb: https://storage.googleapis.com/pyplots-images/plots/density-basic/seaborn/plot_thumb.png
1212
preview_html: null
13-
quality_score: 93
13+
quality_score: null
1414
impl_tags:
1515
dependencies: []
1616
techniques: []
1717
patterns:
18-
- data-generation
18+
- data-generation
1919
dataprep:
20-
- kde
20+
- kde
2121
styling:
22-
- alpha-blending
22+
- alpha-blending
2323
review:
2424
strengths:
2525
- Excellent use of seaborn kdeplot with fill and rugplot combination for statistical

0 commit comments

Comments
 (0)