Informatics Practices
Create an ndarray containing 16 values and then plot this array along with dataset of previous question in same histogram, cumulative histograms.
PyPlot
3 Likes
Answer
import 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, cumulative = True)
plt.hist(random_array, cumulative = True)
plt.title('Cumulative Histograms')
plt.show()
Output

Answered By
3 Likes
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 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.
Create an ndarray containing 16 values and then plot this array along with dataset of previous question in same histogram, horizontal histograms.
Out of above plotted histograms, which ones can be used for creating frequency polygons ? Can you draw frequency polygons from all the above histograms ?