How to label datapoints in a boxplot?

32 Ansichten (letzte 30 Tage)
Nuria Andreu
Nuria Andreu am 30 Jun. 2021
Kommentiert: Sabrina Bitz am 13 Mai 2022
Hello! I have a boxplot with 3 subplots in it. I want to display each median, outlier, whisker, etc in my figure. I do not want to use a text format because I want to use the same code for different CSV files. The CSV files I will use later on have different medians, outliers, etc.
Hope anyone can help me
Thank yo!

Antworten (1)

Kishan Dhakan
Kishan Dhakan am 30 Jun. 2021
To modify graphics properties of a box plot component, use findobj with the Tag property to find the component's handle. Tag values for box plot components depend on parameter settings, and are listed in the following table.
Parameter SettingsTag Values
All settings
  • 'Box'
  • 'Outliers'
When 'PlotStyle' is 'traditional'
  • 'Median'
  • 'Upper Whisker'
  • 'Lower Whisker'
  • 'Upper Adjacent Value'
  • 'Lower Adjacent Value'
When 'PlotStyle' is 'compact'
  • 'Whisker'
  • 'MedianOuter'
  • 'MedianInner'
When 'Notch' is 'marker'
  • 'NotchLo'
  • 'NotchHi'
  2 Kommentare
Nuria Andreu
Nuria Andreu am 30 Jun. 2021
Hello, but how can I dispay the values into the boxplot? I want it to look like this image with median values, outliers, etc:
but this is the result I am getting right now
thank you!
Sabrina Bitz
Sabrina Bitz am 13 Mai 2022
Did you get it? I have the same question.

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by