how can i modify bplot.m in order to display calculated values on the boxplot

2 次查看(过去 30 天)
Hi,
I recently downloaded the "bplot.m" to create boxplots from several data files. However, i didn't succeed in displaying calculated values (mean, median ...) on each boxplot.
How can i modify the bplot.m to get these values visible on the corresponding boxplot?
Thank you in advance for your answers,
  3 个评论

请先登录,再进行评论。

采纳的回答

Geoff Hayes
Geoff Hayes 2015-4-23
Fatzo - if you wish to write the (for example) mean values, then use text to put this number where roughly the plus symbol is. For example, find the line that draws the mean symbol
hReg2(end+1) = plot(y,meanX,'+','linewidth',linewidth,'color',meanColor,'markersize',10);
and add the following to write the mean as text
text(y + 0.1,meanX,num2str(meanX));
In the above, the text is written a little to the right of the plus symbol. You should be able to do something similar for the other calculated values.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Axis Labels 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by