Bug in boxplot?
显示 更早的评论
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
???
采纳的回答
更多回答(1 个)
Alan
2020-11-13
0 个投票
I attach a file which explains the serious issues with boxplot for R2019b (and maybe other versions). can you help please. See attached pdf for full details
Alan
2 个评论
Paul
2020-11-20
You should post this as a new question. In the meantime, your first two examples worked fine for me on 2019a (I reaize you're using 2019b). What's the output of:
which boxplot -all
Alan
2020-11-20
yes I had been planning to. Thanks for the tip, I get this output
C:\Users\Alan Pickering\Google Drive\matlab code\work in EP docs Matlab\mcmc\boxplot.m
C:\Program Files\MATLAB\R2019b\toolbox\stats\stats\boxplot.m % Shadowed
I can see that I have an (old) mcmc toolbox on my machine which has a command called boxplot in it.
removing that and all works fine.
类别
在 帮助中心 和 File Exchange 中查找有关 Fit Postprocessing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!