Hi Herbie,

a vertical box with whiskers is defined by 6 coordinates:
one x-value, followed by 5 y-values (quartiles) in increasing order. 

The example below is copied from:
         Help>Examples>Plots>Shapes
Here, the second box+whiskers is defined by values 1,1,3,4,5,6
(x, y1, y2, y3, y4, y5)

//function verticalBoxesAndWhiskers() 
   Plot.create("Vertical Boxes and Whiskers_", "X", "Y");
   Plot.setFrameSize(600, 350);
   Plot.setLimits(-1, 4, 0, 7);
   xxCenter = Array.getSequence(4);
   yy1 = newArray(1,1,1,1);//First Quartiles
   yy2 = newArray(2,3,2,2);
   yy3 = newArray(3,4,3,3);//Medians
   yy4 = newArray(4,5,4,4);
   yy5 = newArray(5,6,5,5);
   Plot.setLineWidth(2);
   Plot.setColor("blue", "#ccccff");
   Plot.drawShapes("boxes width=30", xxCenter, yy1, yy2, yy3, yy4, yy5);
   Plot.setLineWidth(1);
   Plot.show;

Norbert


> On 28. Sep 2024, at 17:38, Herbie <[email protected]> wrote:
> 
> Dear experts,
> 
> could someone please explain in greater detail what is meant by:
> 
> "
> *drawShapes*
> 
> public void drawShapes​(java.lang.String shapeType, java.util.ArrayList 
> floatCoords)
> 
>    Adds a set of 'shapes' such as boxes and whiskers
> 
>    Parameters:
>        shapeType - e.g. "boxes width=20"
>        floatCoords - eg[6][3] holding 1 Xval + 5 Yvals for 3 boxes
> "
> 
> =====
> 
> Especially, how does
> 
>       "1 Xval + 5 Yvals"
> 
> work for 3 boxes if the box-width is given?
> 
> It would help to see the definition of "floatCoords" for this case.
> 
> Many thanks
> 
> Herbie
> :::::::::::::
> 
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> 

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Reply via email to