[ncl-talk] bin size

Rick Brownrigg brownrig at ucar.edu
Thu May 21 10:36:28 MDT 2015


Yes you are right, my mistake -- those specific resources are return values
from pdfx().  There are however these input resources that can be attached
to the 3rd parameter (opt) of pdfx():

Setting opt=True will activate use of the options.

   - *v510* - The original *pdfx* has been modified. The new [5.1.1]
   function was created to be more consistent with the *pdfxy*
   <http://ncl.ucar.edu/Document/Functions/Contributed/pdfxy.shtml>
   released with 5.1.1. Setting the *v510* attribute to True will result in
   the original v5.1.0 version being used. [see *Description*]
   - *bin_min* - minimum value for the bin boundary.
   - *bin_max* - maximum value for the bin boundary.
   - *bin_nice* - "nice" bin boundary values and spacing will be
   calculated. If the user has specified *nbin*, it will be ignored and the
   calculated number of bins will be used.

Do any of these get you what you need?   Perhaps someone more knowledgeable
on PDFs can comment here...

Rick



On Thu, May 21, 2015 at 10:19 AM, mamadoulamine.mbaye at ucad.edu.sn <
mamadoulamine.mbaye at ucad.edu.sn> wrote:

>  Hi,
>
> I have seen three inputs only :
>
> function pdfx (
> 		x        : numeric,
> 		nbin [1] : integer,
> 		opt  [1] : logical
> 	)
> the others are in the return value.
>
>
>  ------------------------------
> *De :* Rick Brownrigg <brownrig at ucar.edu>
> *Envoyé :* jeudi 21 mai 2015 08:58
> *À :* mamadoulamine.mbaye at ucad.edu.sn
> *Cc :* ncl-talk at ucar.edu USERS
> *Objet :* Re: [ncl-talk] bin size
>
>    Hi,
>
>  Those resources in the warning messages are inputs to the pdfx()
> functions, not to the graphics functions.  See:
>
> http://ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml
>
>  Hope that helps...
>  Rick
>
> On Thu, May 21, 2015 at 9:41 AM, mamadoulamine.mbaye at ucad.edu.sn <
> mamadoulamine.mbaye at ucad.edu.sn> wrote:
>
>>  Dear,
>>
>> I would like to reduce the size of the bins for a PDF plot, I got these
>> errors:
>>
>> ==========
>>
>> warning:bin_bound_min is not a valid resource in pdf_climate_xy at this
>> time
>> warning:bin_bound_max is not a valid resource in pdf_climate_xy at this
>> time
>> warning:bin_spacing is not a valid resource in pdf_climate_xy at this time
>>
>> =============
>>
>> here is the script:
>>
>>
>> f =asciiread("/home/data_climate_paper.txt",(/2484,4/),"float")
>> ucH=f(:,0)
>> ucR=f(:,1)
>> bcH=f(:,2)
>> bcR=f(:,3)
>> ap= pdfx(ucH,20,True)
>> bp= pdfx(ucR,20,True)
>> cp= pdfx(bcH,20,True)
>> dp= pdfx(bcR,20,True)
>>
>> nVar    = 4
>> nBin    = ap at nbins
>> ;plot    = new ( nVar, "graphic")
>> xx      = new ( (/nVar, nBin/), typeof(ap))
>>   xx(0,:) = ap at bin_center
>>   xx(1,:) = bp at bin_center
>>   xx(2,:) = cp at bin_center
>>   xx(3,:) = dp at bin_center
>>   yy      = new ( (/nVar, nBin/), typeof(ap))
>>   yy(0,:) = (/ ap /)
>>   yy(1,:) = (/ bp /)
>>   yy(2,:) = (/ cp /)
>>   yy(3,:) = (/ dp /)
>>
>> ;=========================================================================================
>>   wks   = gsn_open_wks ("x11", "pdf_climate" )
>> res                   = True
>> res at xyLineThicknesses          = (/4.0,4.0,4.0,4.0/)
>>   res at xyLineColors             = (/"blue","red","green","orange"/)
>>   res at xyMonoDashPattern        = True              ; all solid
>>   res at tiYAxisString            = "PDF (%)"
>>   res at trXMinF               = 0
>>   res at trXMaxF               = 40
>>   res at gsnXYBarChart            = True              ; Create bar plot
>>   res at gsnXYBarChartOutlineOnly = True
>>   res at bin_bound_min           =0
>>   res at bin_bound_max           =20
>>   res at bin_spacing             =5
>>
>>
>>   res at tiMainString           = "Probabilty Density Functions"
>>   plot = gsn_csm_xy (wks, xx, yy, res)
>> end
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150521/4208dcda/attachment.html 


More information about the ncl-talk mailing list