5

I am using Pandas and Matplotlib to plot boxplots. I understand that the whisker endpoints typically represent outlier values, such max/min, Q3 + 1.5 IQR / Q1 - 1.5 IQR, etc. I know that you can set what the endpoints represent with the boxplot() parameter whis in the function call.

What I want is to show multiple indicators of outliers, such as multiple percentiles. So the boxplot could show max, 99th, 90th, ... 10th, 1st, min, as shown below.

enter image description here

Is there any way to do this?

I already found these Stackoverflow questions but could not find an answer:

Boxplots in matplotlib: Markers and outliers

Changing what the ends of whiskers represent in matplotlib's boxplot function

stackoverflowuser2010
  • 38,621
  • 48
  • 169
  • 217
  • 1
    I see two options 1) add them yourself with raw matplotlib commands, 2) make multiple calls to `boxplot`, plotting several identical boxes with different whiskers on top of each other. There's no official way to do it through a single call to the `boxplot` function. You might get lucky by specifying multiple whisker lengths in the `bxp` function https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L3631 – Paul H Jan 30 '18 at 01:18

0 Answers0