Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plots/matplotlib/hist/histogram-basic/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd


# Data
np.random.seed(42)
values = np.random.normal(100, 15, 500)
data = pd.DataFrame({"value": np.random.normal(100, 15, 500)})

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

# Labels and styling
ax.set_xlabel("Value", fontsize=20)
Expand Down
Loading