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 step type of histogram from the above data.
PyPlot
3 Likes
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, histtype = 'step')
plt.title('Weight Distribution of French Fries Orders')
plt.show()
Output

Answered By
1 Like
Related Questions
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 69Create a simple histogram from the above data.
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 69Create a horizontal histogram from the above data.
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 69Create a cumulative histogram from the above data.
Create an ndarray containing 16 values and then plot this array along with dataset of previous question in same histogram, normal histograms.