KnowledgeBoat Logo
|

Informatics Practices

Given the following set of data :

Weight measurements for 16 small orders of French-fries (in grams).

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

Create a horizontal histogram from the above data.

PyPlot

1 Like

Answer

import matplotlib.pyplot as plt
weights = [78, 72, 69, 81, 63, 67, 65, 75, 79, 74, 71, 83, 71, 79, 80, 69]
plt.hist(weights, orientation = 'horizontal')
plt.title('Weight Distribution of French Fries Orders')
plt.show()
Output
Given the following set of data : Weight measurements for 16 small orders of French-fries (in grams). Create a horizontal histogram from the above data. Plotting with Pyplot, Informatics Practices Computer Science Sumita Arora Solutions CBSE Class 12

Answered By

1 Like


Related Questions