I have a bunch of distributions of chemical concentrations that correspond to discrete times. I would like to plot these distributions all on the same plot (a plots of plots) in a sort of way that is done in these pictures (the first picture comes from Doing Bayesian Data Analysis, Kruschke):
Right now I have these distributions as parameters to scipy distribution objects and am able to graph them individually, like (where normal_param
, comes from scipy.optimize.curve_fit
on the normal cdf):
from matplotlib import pyplot as plt
import numpy
# values = [some float, some other float] which is a list of cdf sample concentrations
values = [...,...]
mean = numpy.mean(values)
std = numpy.std(values)
x1 = numpy.linspace(mean - (4*std), mean + (6*std), num=200)
plt.plot(x1, stats.norm.pdf(x1, scale=normal_param[1], loc=normal_param[0]),
linewidth=2.0, color='g')
I am new to matplotlib, and am not completely sure where to even start with the process of adding each of these individual plots to make the multiple distribution plot.
How can I make a plot that looks like these in matplotlib?