How to label datapoints in a boxplot?

17 ビュー (過去 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