I want to determine the X value that has the highest pick in the histogram. The code to print the histogram: Histogram and value wanted (in fact, I would like all 4): Answer You will need to retrieve the underlying x and y data for your lines using matplotlib methods. If you are using displot, as in your excerpt, then
Tag: kernel-density
How can I make a scatter plot colored by density in matplotlib?
I’d like to make a scatter plot where each point is colored by the spatial density of nearby points. I’ve come across a very similar question, which shows an example of this using R: R Scatter Plot: symbol color represents number of overlapping points What’s the best way to accomplish something similar in python using matplotlib? Answer In addition to