KnowledgeBoat Logo
|

Informatics Practices

Given the following set of data:

Weight measurements for 14 values of muffins (in grams)

78, 72, 69, 81, 63, 67, 65
79, 74, 71, 83, 71, 79, 80

Create a simple histogram from the above data.

PyPlot

1 Like

Answer

import matplotlib.pyplot as plt
weights = [78, 72, 69, 81, 63, 67, 65, 79, 74, 71, 83, 71, 79, 80]
plt.hist(weights)
plt.title('Weight Distribution of muffins')
plt.show()
Output
Given the following set of data: Weight measurements for 14 values of muffins (in grams). Data Visualization using Matplotlib, Informatics Practices Preeti Arora Solutions CBSE Class 12

Answered By

1 Like


Related Questions