Skip to content
Advertisement

Tag: histogram

How to define breaks of the bins for log scale in Seaborn

Consider the following minimal working example: The minimal working example above will produce Now, let’s use our own breaks of the bins: I expected to produce a histogram similar to the one before but I’m getting What am I doing wrongly? Or is this a bug with Seaborn 0.11.2? Answer Apparently, you have to give the bins on the log

Color bar limits doesn’t follow the data limits

I am trying to make plot with two 2d histograms. And i need them both to have a colorbar. But, i was able to plot the colobar at the lateral of one of these histograms, but as can see in the image below, the limits of the color bar doesn’t reflect the limits of the histogram. The bin with higher

Control the facecolor of histograms

In the following histogram, I would like to set two different colors for the bars of the histogram. There is a precedent question (this link), but the solution sets the bars’ colors in a range, e.g., bars 0 to 3 of one color. This is a different problem since I would like to differentiate two zones in the histogram in

Matplotlib stacked histogram numpy.ndarray error

I am trying to make a stacked histogram using matplotlib by looping through the categories in the dataframe and assigning the bar color based on a dictionary. I get this error on the ax1.hist() call. How should I fix it? AttributeError: ‘numpy.ndarray’ object has no attribute ‘hist’ Reproducible Example Updated effort, still not working This is close, but it is

Advertisement