Skip to content

Commit 405c694

Browse files
feat(matplotlib): implement histogram-basic (#477)
## Summary Implements `histogram-basic` for **matplotlib** library. **Parent Issue:** #206 **Sub-Issue:** #323 **Base Branch:** `plot/histogram-basic` **Attempt:** 1/3 ## Implementation - `plots/matplotlib/hist/histogram-basic/default.py` ## Changes - Uses pandas DataFrame structure as specified in the spec - Follows the style guide: Python Blue (#306998), 16x9 aspect ratio - Font sizes: 20pt for labels/title, 16pt for tick labels - Y-axis grid with 0.3 alpha for readability - Simple sequential code (no functions) per plot-generator rules Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
1 parent 4882920 commit 405c694

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plots/matplotlib/hist/histogram-basic/default.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55

66
import matplotlib.pyplot as plt
77
import numpy as np
8+
import pandas as pd
89

910

1011
# Data
1112
np.random.seed(42)
12-
values = np.random.normal(100, 15, 500)
13+
data = pd.DataFrame({"value": np.random.normal(100, 15, 500)})
1314

1415
# Create plot
1516
fig, ax = plt.subplots(figsize=(16, 9))
16-
ax.hist(values, bins=30, alpha=0.8, color="#306998", edgecolor="white", linewidth=0.5)
17+
ax.hist(data["value"], bins=30, alpha=0.8, color="#306998", edgecolor="white", linewidth=0.5)
1718

1819
# Labels and styling
1920
ax.set_xlabel("Value", fontsize=20)

0 commit comments

Comments
 (0)