Home > database >  How to add displot to sub-histogram using matplotlib
How to add displot to sub-histogram using matplotlib

Time:09-22

I have simplified code like this:

fig, axs = plt.subplots(1, 2)
axs[0].hist(x)
axs[1].hist(y)

and I need to add density curve to each plot. Anyone know reasonable simple way to do this? It could be using seaborn. Kindly help.

Funtion seaborn.displot() does not working in subplots.

CodePudding user response:

You could use enter image description here

  • Related