How to have more than one box plot in one plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
BN
am 5 Apr. 2020
Kommentiert: Ameer Hamza
am 5 Apr. 2020
Hey all,
I'm unable to plot more than one box plot in one figure. My data sets are seven n x 1 double (every double array of this seven and I have 7 of them which I want to have boxplots for every 7 data set in one figure, something like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/282088/image.png)
Sample data are provided, I have 7 file like this
Thank you all.
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 5 Apr. 2020
Please refer to my answer here: https://www.mathworks.com/matlabcentral/answers/392679-how-to-fill-boxes-in-boxplot-with-different-colors
4 Kommentare
Weitere Antworten (1)
Florian Floh
am 5 Apr. 2020
Concatenating your data into one matrix should do the trick.
Let's say you load two arrays:
load('y.mat');
load('x.mat');
% Concatenate them to a matrix named z
z = [x,y];
% Create a boxplot
boxplot(z);
Siehe auch
Kategorien
Mehr zu Discrete Data Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!