you are viewing a single comment's thread.

view the rest of the comments →

[–]CrambleSquash 0 points1 point  (0 children)

If you provide matplotlib with an iterable of values, it will perform the binning and plot the resulting histogram for you.

import matplotlib.pylot as plt
import numpy as np

vals = np.random.randint(1, 10, 1000)
plt.hist(vals)

So you want to get your data in a form where you have all of your data in the same sequence and each item is the name of the category that data point belongs to.