How can I add a legend to my boxplot for specific elements?

1 vue (au cours des 30 derniers jours)
Nathalie
Nathalie le 11 Jan 2020
This is the code for my figure:
AD is a matrix with data (8x10).
figure(1);
hold on;
A = boxplot(AD,'OutlierSize',4); % Boxplot
plot(t,AD,'Marker','.','LineStyle','none','MarkerSize',12); % Data single participants
MA = plot(mean(AD,'omitnan'),'Marker','x','Color','k','LineStyle','none'); % Mean for each training
title('Amplitudeverschil');
ylabel('Amplitude(%)');
xlabel('trainingsnummer');
axis([0.5 11 0 80]);
grid on;
hold off;
This is the result:
AmplBoxplot.jpg
How can I add a legend in wich I include: Median, Min & Max, Outlier, interquartile ranges and the mean (plotted as MA).

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by