10 Exp Python
10 Exp Python
i) WAP to implement different types of plots using Numpy and Matplotlob
Source Code:
# Histogram example
data = np.random.randn(1000)
plt.figure(figsize=(6, 5))
plt.hist(data, bins=30, color='lightblue', edgecolor='black')
plt.title('Histogram: Distribution of Random Data')
plt.xlabel('Value')
plt.ylabel('Frequency')
plt.grid(True)
plt.show()
OUTPUT: