Bug in boxplot?
Afficher commentaires plus anciens
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
???
Réponse acceptée
Plus de réponses (1)
Alan
le 13 Nov 2020
0 votes
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 commentaires
Paul
le 20 Nov 2020
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
le 20 Nov 2020
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.
Catégories
En savoir plus sur Fit Postprocessing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!