Proposed modification to boxplot()

"Sajec, Mike TQO" <msajec@...312...> writes:

Instead of only accepting an (mxn) matrix (x) and creating (n) boxplots
from the columns of (x), optionally in place of the (mxn) matrix accept
a list of numeric arrays which can be any length, and create boxplots
for each of the arrays in the list.

In my opinion the idea is good. You can get the same result by calling
boxplot separately for each array, but then you need to keep track of
the positions and fix the axis limits manually afterwards. E.g.,

x1 = normal(10,3,[100,3])
x2 = normal(10,5,[150,2])
x3 = normal(10,1,[1000,4])
pos = 1
for x in x1, x2, x3:
    newpos = pos + x.shape[1]
    boxplot(x, positions=range(pos, newpos))
    pos = newpos
axis([0.5, pos-0.5, 0, 30])

Your implementation seems to reshape each array to only have one
column. I think it would be more useful and less surprising to plot
each column of each array in the list, as in the example above.

···

--
Jouni