In the documentation of matplotlib’s boxplot we can read: whiskerprops : dict or None (default) If provided, will set the plotting style of the whiskers Ok, so I passed a dict to set some visual styles on the whiskers: The settings have no effect, except the color. Same behaviour could be observed at th…
Tag: boxplot
Histogram with Boxplot above in Python
Hi I wanted to draw a histogram with a boxplot appearing the top of the histogram showing the Q1,Q2 and Q3 as well as the outliers. Example phone is below. (I am using Python and Pandas) I have checked several examples using matplotlib.pyplot but hardly came out with a good example. And I also wanted to have …
Pandas secondary y axis for boxplots
I’d like to use a secondary y-axis for some boxplots in pandas, but it doesn’t seem available. Now, using the default line plot it’s easy enough to plot to a second y-axis: But if I use boxplot style, it doesn’t work: Is there any way (maybe through matplotlib) I can get pandas to plot…
Boxplots in matplotlib: Markers and outliers
I have some questions about boxplots in matplotlib: Question A. What do the markers that I highlighted below with Q1, Q2, and Q3 represent? I believe Q1 is maximum and Q3 are outliers, but what is Q2? Question B How does matplotlib identify outliers? (i.e. how does it know that they are…
matplotlib: Group boxplots
Is there a way to group boxplots in matplotlib? Assume we have three groups “A”, “B”, and “C” and for each we want to create a boxplot for both “apples” and “oranges”. If a grouping is not possible directly, we can create all six combinations and pla…