Boxplots in matplotlib: Markers and outliers

后端 未结 6 921
情深已故
情深已故 2020-12-07 08:52

I have some questions about boxplots in matplotlib:

Question A. What do the markers that I highlighted below with Q1, Q2

6条回答
  •  难免孤独
    2020-12-07 09:31

    The box represents the first and third quartiles, with the red line the median (2nd quartile). The documentation gives the default whiskers at 1.5 IQR:

    boxplot(x, notch=False, sym='+', vert=True, whis=1.5,
            positions=None, widths=None, patch_artist=False,
            bootstrap=None, usermedians=None, conf_intervals=None)
    

    and

    whis : [ default 1.5 ]

    Defines the length of the whiskers as a function of the inner quartile range. They extend to the most extreme data point within ( whis*(75%-25%) ) data range.

    If you're confused about different box plot representations try reading the description in wikipedia.

提交回复
热议问题