Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do multiple boxplots with Octave?

Tags:

octave

boxplot

I have 3 matrices that I would like to be plotted on a boxplot (two of them are 22 rows by 83 columns, and the other is 7 rows by 83 columns) within Octave.

I've tried:

boxplot([red(:,1),blue(:,1),purple(:,1)])

error: horizontal dimensions mismatch error: evaluating argument list element number 1

But, I keep getting the above error. I assume it's because I have one matrix with 7 rows instead of 22? If so, is there any possible way of getting them both plotted on the same boxplot?


1 Answers

When you pass [a,b,c] you are trying to build a matrix by concatenating horizontally the other three. Since they do not have the same number of rows that will never work.

If you want to do the boxplot use cells (as indicated in help boxplot) that is

boxplot ({red(:,1),blue(:,1),purple(:,1)})
like image 191
JuanPi Avatar answered Feb 16 '26 22:02

JuanPi