How to have more than one box plot in one plot?

2 次查看(过去 30 天)
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:
Sample data are provided, I have 7 file like this
Thank you all.

采纳的回答

Ameer Hamza
Ameer Hamza 2020-4-5
  4 个评论

请先登录,再进行评论。

更多回答(1 个)

Florian Floh
Florian Floh 2020-4-5
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);

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by