How to plot multiple box plots on same graph with same size vector?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello, I have two vectors with the same length and I want to plot both in the same boxplot but I can only see one
I tried this
vol = [D1(:,1);C1(:,1)];
plot = figure;
boxplot(vol);
title('Volume differences')
ylabel('Volume [m^{3}]')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/723759/image.png)
0 commentaires
Réponse acceptée
Wan Ji
le 28 Août 2021
Hi, just change line 1
vol = [D1(:,1);C1(:,1)];
to
vol = [D1(:,1), C1(:,1)];
2 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!