1

There is a very simple way to do kde plot when you just want to do a single plot for a pandas series, which goes like this (documented here):

some_pandas_series.plot.kde()

Now, assume I have a grid of subplots created like this:

fig, axs = plt.subplots(2, 5)

axs is an array of objects of Axes class, which has several familiar plotting methods, like plot, bar pie etc. But I would like to do something like this:

axs[0, 1].kde(some_pandas_series)

Unfortunately, the Axes type of objects don't seem to have such kde method or anything too obvious and straightforward to be used instead. What would be the easiest way to achieve the kde plot in such subplots context?

0 Answers0