Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
F Z
F Z le 22 Avr 2015
Commenté : F Z le 23 Avr 2015
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 commentaires
F Z
F Z le 22 Avr 2015
Modifié(e) : F Z le 22 Avr 2015
Oh sorry, thought that i attached it

Connectez-vous pour commenter.

Réponse acceptée

Geoff Hayes
Geoff Hayes le 23 Avr 2015
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.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by