Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
286 B
2
Indexable
Never
import matplotlib.pyplot as plt
import numpy as np

# Data
weights = [28.9, 28.2, 29.3, 28.7, 28.5, 28.2]

# Histogram
plt.hist(weights, bins=10, edgecolor='black', alpha=0.7)
plt.title('Histogram of Potato Chip Weights')
plt.xlabel('Weight (grams)')
plt.ylabel('Frequency')
plt.show()
Leave a Comment