[ncl-talk] bin size

Dennis Shea shea at ucar.edu
Thu May 21 10:39:45 MDT 2015


?? Did you read the documentation for pdfx? ??

ap= pdfx(ucH,20,True)   ; your code

  opt         = True
  opt at bin_min =  0.0
  opt at bin_max =  20.0
 ;opt at bin_nice= True    ; if activated 'nbin' will be ignored
  nbin        = 20      ; you could increase this
  ap = *pdfx*(ucH, nbin, opt)

These should be deleted.

  res at bin_bound_min           =0
  res at bin_bound_max           =20
  res at bin_spacing             =5

=================================

I think you should look at NCL's

https://www.ncl.ucar.edu/Applications/histo.shtml

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
>>
>>
>
> _______________________________________________
> 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/ff65fc83/attachment.html 


More information about the ncl-talk mailing list