I get what it seems a weird behavior from boxplot. If I have an array with a single column, and specify groups as the scalar 1, AND specify ANY additional parameters, I get an error (see example below). The error is about parameter 'Orientation' which is not the one specified. However, if I don't specify additional parameters OR if the scalar is anything else (say 2, or a cell) there is no error. Is this a bug? Any suggestions about it?. I understand the syntax may seem weird but I need it for a function to plot nicer boxplots.
Example:
y= normrnd(0,1,100,1);boxplot(y)
no problem
boxplot(y,1)
no problem
boxplot(y,1,'symbol','.')Error using boxplot>parseArgs (line 591)'.' is not a valid value for the 'Orientation' argument. The value must be 'horizontal' or 'vertical'.Error in boxplot (line 251)[ax,x,g,notch,symbol,orientation,whisker,labels,labelverbosity, ...
—
boxplot(y,2,'symbol','.')
no problem
boxplot(y,{1},'symbol','.')
no problem
???
Best Answer