How to get values and bins from a Seaborn histogram? #3649
Unanswered
MarrybellMB
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
When I create a histogram with Matplotlib, I can easily get it's values and bins by the command:
import matplotlib.pyplot as plt
hist = plt.hist(....)
vals, bins = hist[0], hist[1]
But I can't find how to get them from a Seaborn histogram. I tried:
import seaborn as so
hist = so.displot(....)
vals, bins = hist[0], hist[1]
But it dindn't work. Could you tell me how I can get values and bins from Seaborn histogram, plase?
If there is no way to do that, I think it's a feture you shoud add for future versions. Indeed, it would be very usefull to make fits, especially with scipy.optimize...
Thank you in advance for your help!
Cordially,
Beta Was this translation helpful? Give feedback.
All reactions