Re: pdfxy

From: Julia Andrys <juliaandrys_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 12 2013 - 14:23:51 MST

No you're right, you shouldn't have to, or at least you don't when using
the pdfx function, which is what I use mainly. Possibly pdfxy is differnt
but I don't see why Sorry Marston, I am out of ideas for you now. Hopefully
someone else has some suggestions for you.

On Tue, Nov 12, 2013 at 1:04 PM, Marston Johnston <shejo284@gmail.com>wrote:

> So you mean I have to adjust my min and max each time? All my arrays will
> have different min and max. SO what you are saying is that I have to use
> fspan to find the nbinx value each time?
> Setting opt@binx_nice = false did not help.
>
> /M
>
>
> On Tue, Nov 12, 2013 at 9:43 PM, Julia Andrys <juliaandrys@gmail.com>wrote:
>
>> It doesn't look like your x variable has a max value of 60 to me:
>>
>> xMIN : 0.4511555433273315
>> xMAX : 13.29794788360596
>>
>> So if you set your nbinx and your binx_max accordingly, then you should
>> get 1.0 spaced bin integers. Have you also tried switching opt@binx_niceto false? I find this tends to work better when I am specifying my own bins.
>>
>>
>>
>>
>> On Tue, Nov 12, 2013 at 12:27 PM, Marston Johnston <shejo284@gmail.com>wrote:
>>
>>> Hi Julia,
>>>
>>> I don't think your idea works:
>>>
>>> Variable: pdf2
>>> Type: double
>>> Total Size: 11040 bytes
>>> 1380 values
>>> Number of Dimensions: 2
>>> Dimensions and sizes: [y | 23] x [x | 60]
>>> Coordinates:
>>> y: [ 1.5..23.5]
>>> x: [0.5582121461629868..13.1908912807703]
>>> Number Of Attributes: 26
>>> _FillValue : 9.969209968386869e+36
>>> nMax : 9925
>>> nUse : 9925
>>> nOut : 0
>>> pcUse : 100
>>> pcOut : 0
>>> xMIN : 0.4511555433273315
>>> xMAX : 13.29794788360596
>>> binx_center : <ARRAY of 60 elements>
>>> binx_bounds : <ARRAY of 61 elements>
>>> binx_bound_min : 0.4511555433273315
>>> binx_bound_max : 13.29794788360596
>>> binx_spacing : 0.2141132056713104
>>> nbinsx : 60
>>> pcxLoOut : 0
>>> pcxHiOut : 0
>>> yMIN : 1
>>> yMAX : 24
>>> biny_center : <ARRAY of 23 elements>
>>> biny_bounds : <ARRAY of 24 elements>
>>> biny_bound_min : 1
>>> biny_bound_max : 24
>>> biny_spacing : 1
>>> nbinsy : 23
>>> pcyLoOut : 0
>>> pcyHiOut : 0
>>> (0)
>>> (0) min=0.0100756 max=5.93451
>>>
>>> I'm not sure how pdfxy creates the bins.
>>>
>>> /M
>>>
>>>
>>> On Tue, Nov 12, 2013 at 9:21 PM, Julia Andrys <juliaandrys@gmail.com>wrote:
>>>
>>>> Hi Marston,
>>>>
>>>> When you call the function, there is the option to specify the number
>>>> of x and y bins:
>>>>
>>>> function pdfxy (
>>>> x : numeric,
>>>> y : numeric,
>>>> nbinx [1] : integer,
>>>> nbiny [1] : integer,
>>>> opt [1] : logical
>>>> )
>>>>
>>>> Because you know your max and min values for x and y, just specify the
>>>> number of bins accordingly to get the bin space you need. So you would
>>>> specify nbinx = 60 and nbiny = 23.
>>>>
>>>> Hope this helps,
>>>>
>>>> Julia
>>>>
>>>>
>>>> On Tue, Nov 12, 2013 at 12:08 PM, Marston Johnston <shejo284@gmail.com>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm trying to control the bin size of the pdfxy function such that the
>>>>> bin spacing is set to 1.0. But I'm at a loss of how to do that. Does anyone
>>>>> know how to do this through the opt variable?
>>>>>
>>>>> opt = True
>>>>> opt@fraction = True
>>>>> opt@binx_min = 0. ;minimum value for the x bin boundary.
>>>>> opt@biny_min = 0. ;minimum value for the y bin boundary.
>>>>> opt@binx_max = 60. ;maximum value for the x bin boundary.
>>>>> opt@biny_max = 23. ;maximum value for the y bin boundary.
>>>>> opt@binx_nice = True ; let NCL calculate "nice" bin boundary values
>>>>> x
>>>>> opt@biny_nice = True ; let NCL calculate "nice" bin boundary values
>>>>> y
>>>>>
>>>>> results in:
>>>>>
>>>>> Variable: pdf2
>>>>> Type: double
>>>>> Total Size: 5000 bytes
>>>>> 625 values
>>>>> Number of Dimensions: 2
>>>>> Dimensions and sizes: [y | 25] x [x | 25]
>>>>> Coordinates:
>>>>> y: [1.46..23.54]
>>>>> x: [1.24..12.76]
>>>>> Number Of Attributes: 26
>>>>> _FillValue : 9.969209968386869e+36
>>>>> nMax : 9925
>>>>> nUse : 3955
>>>>> nOut : 5991
>>>>> pcUse : 39.84887
>>>>> pcOut : 60.36272
>>>>> xMIN : 0.4511555433273315
>>>>> xMAX : 13.29794788360596
>>>>> binx_center : <ARRAY of 25 elements>
>>>>> binx_bounds : <ARRAY of 26 elements>
>>>>> binx_bound_min : 1
>>>>> binx_bound_max : 13
>>>>> binx_spacing : 0.48
>>>>> nbinsx : 25
>>>>> pcxLoOut : 60.14106
>>>>> pcxHiOut : 0.01007557
>>>>> yMIN : 1
>>>>> yMAX : 24
>>>>> biny_center : <ARRAY of 25 elements>
>>>>> biny_bounds : <ARRAY of 26 elements>
>>>>> biny_bound_min : 1
>>>>> biny_bound_max : 24
>>>>> biny_spacing : 0.92
>>>>> nbinsy : 25
>>>>> pcyLoOut : 0
>>>>> pcyHiOut : 0.2115869
>>>>> (0)
>>>>> (0) min=0.0100756 max=4.10076
>>>>>
>>>>> Sincerely,
>>>>> Marston
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Only the fruitful thing is true!
>>>
>>
>>
>
>
> --
> Only the fruitful thing is true!
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 12 14:24:04 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 22 2013 - 09:36:32 MST