フィルターのクリア

How to use boxchart 'GroupByColor'

17 ビュー (過去 30 日間)
Fuqiang Guo
Fuqiang Guo 2021 年 12 月 23 日
コメント済み: Fuqiang Guo 2021 年 12 月 23 日
Wrong use of matlab.graphics.chart.primitive.BoxChart
Name 'GroupByColor' is not a property that can be accessed by instances of class 'matlab.graphics.chart.primitive.BoxChart'.
When I use the sample proxy in the help documentation, I always get the error above.
It seems that I cannot use the syntax
boxchart(___,'GroupByColor',cgroupdata)

採用された回答

Cris LaPierre
Cris LaPierre 2021 年 12 月 23 日
編集済み: Cris LaPierre 2021 年 12 月 23 日
The ability to group by color was added in R2020b (see this release note). If you have the Statistics and Machine Learning toolbox, you can look into using boxplot instead.
load patients
Smoker = categorical(Smoker,logical([1 0]),{'Smoker','Nonsmoker'});
boxplot(Systolic,Smoker)
ylabel('Systolic Blood Pressure')
legend
  1 件のコメント
Fuqiang Guo
Fuqiang Guo 2021 年 12 月 23 日
Thank you very much, your advice is very helpful, I'll try boxplot instead.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by