On Wed, 21 Jun 2017, Schaff, Frederik wrote:
>> Dear gretl users,
>>
>> I have created a matrix with 4 columns and 1000 rows and now I'd like
>> to use the boxplot command on it, but it is (despite it should) not
>> working... what am I getting wrong? Here is a MWE:
>>
>> ----------
>> nulldata 1000
>> matrix A=zeros(1000,4)
>> loop for r=1..1000
>> loop for c=1..4
>> A[r,c]= randgen1(u,0,c)
>> endloop
>> endloop
>>
>> boxplot --matrix=A --output=display
>> ------------
>> Error msg:
>> ? boxplot --matrix=A --output=display
>> Command has insufficient arguments
>
> You have to tell boxplot which columns of the matrix you want plotted. In
> your case, I suspect that what you want is
>
> <hansl>
> boxplot 1 2 3 4 --matrix=A --output=display </hansl>
>
> Also: you may want to use the --quiet option for loops ;)
>
That's it, many thanks! The quick-help documentation needs an update
than, I guess:
"Generally, the argument varlist is required, and refers to one or
more series in the current dataset (given either by name or ID
number). But if a named matrix is supplied via the --matrix option
this argument becomes optional: by default a plot is drawn for each
column of the specified matrix."
To me this implies that I do not need to specify the columns. This
option is not even mentioned.
You shouldn't have to specify the columns when giving a matrix
argument to the simple boxplot command ("simple" = not factorized), so
you exposed a bug. That's now fixed in git; snapshots will follow.
Allin Cottrell