CBSE Class 12 Informatics Practices
Question 140 of 147
Plotting with Pyplot — Question 23
Back to all questionsimport numpy as np
import matplotlib.pyplot as plt
weights = [78, 72, 69, 81, 63, 67, 65, 75, 79, 74, 71, 83, 71, 79, 80, 69]
random_array = np.arange(16)
plt.hist(weights, orientation = 'horizontal')
plt.hist(random_array, orientation = 'horizontal')
plt.title('Horizontal Histograms')
plt.show()