Re: Box plot

From: <debasish_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 28 2010 - 22:32:42 MDT

Dear Paula,

You are having this problem because you are trying to store too many
values in variable y. In box plot the variable y is a two-dimensional
array, where the rightmost dimension contains the box plot reference pt.
data.
y(n,0)=bottom value
y(n,1)=bottom value of box
y(n,2)=mid value of box
y(n,3)=top value of box
y(n,4)=top value

Therefore, the rightmost dimension of y is generally equal to 5 but in
your case the rightmost dimension is equal to 131161.

Please check the webpage for further details
http://www.ncl.ucar.edu/Document/Functions/Shea_util/boxplot.shtml

For your case, I guess you need to calculate and plot the median, minimum
value, maximum value, and the 25th and 75th percentiles from 131161
values.

Please check the example box_5.ncl
(http://www.ncl.ucar.edu/Applications/box.shtml) to plot the box plot
using median, minimum value, maximum value and percentiles.

Good luck

Debasish

> I want to create a box plot of a variable that has the size (369 x 369)
> but
> somehow my method is not working. I am getting bars that look like
> constant
> values (see attached figure). Are my arrays too large? Can anyone see any
> other obvious mistakes?
>
> I am converting this 369x369 array to a 1-d array with 131161 points.
> Then,
> I am creating a Y variable to carry these values into the boxplot
> function.
> It basically looks like this:
>
>
> *(...)
>
> * * x1_1d = ndtooned(x1)
> x2_1d = ndtooned(x2)
>
> y = new( (/ 2,136161 /), "float", -999.)
> y(0,:) = x1_1d
> y(1,:) = x2_1d
>
> x= (/ 0, 1 /)
>
> boxres = True
> boxres@tmXBLabels = (/"Control", "EM1" /)
>
> plot_box = boxplot(wks,x,y,False,boxres,False)
> draw(wks)
> frame(wks) *
>
> where x1 and x2 are:
>
> Type: float
> Total Size: 544644 bytes
> 136161 values
> Number of Dimensions: 2
> Dimensions and sizes: [369] x [369]
> Coordinates:
>
> *
> *
> *
> *
> *x1_1d and x2_1d are:
> *
> Type: float
> Total Size: 544644 bytes
> 136161 values
> Number of Dimensions: 1
> Dimensions and sizes: [136161]
> Coordinates:
>
>
> and y is:
>
> Type: float
> Total Size: 1089288 bytes
> 272322 values
> Number of Dimensions: 2
> Dimensions and sizes: [2] x [136161]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -999
>
>
> Thanks a lot,
> --
> *Paula Doubrawa Moreira**
> *Graduate Student - Research Assistant
> International Arctic Research Center
> University of Alaska Fairbanks
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 28 22:33:24 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 30 2010 - 13:45:56 MDT