How to label datapoints in a boxplot?

조회 수: 20 (최근 30일)
Nuria Andreu
Nuria Andreu 2021년 6월 30일
댓글: Sabrina Bitz 2022년 5월 13일
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!

답변 (1개)

Kishan Dhakan
Kishan Dhakan 2021년 6월 30일
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
Nuria Andreu
Nuria Andreu 2021년 6월 30일
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 2022년 5월 13일
Did you get it? I have the same question.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by