[ncl-talk] PDF plot changes with bin_nice and without.

Sri nandini bax8609 at uni-hamburg.de
Mon Jun 8 04:04:42 MDT 2020


Could someone please advice me on the following?

On 05.06.20 09:28, Sri nandini via ncl-talk wrote:
> Hello ncl users,
>
> I have a question on plotting my PDF, which changes (as it should) 
> with specific bin_nice and without.
>
> Below is an example of my script, and the attached 2 plots, once with 
> using the bin_nice and one with using the bin_min and max.
>
> I don't understand why bin space and values change, can some one help 
> me understand this?
>
> Thanx Sri
>
> ~~~~~ snippet of the main PDF code~~~~
>
>
> print("calculate PDFs...")
> ;; calculate empirical PDF
>
>   opt          = True
>   ;opt at bin_min = -50.  (i have also tried it with 100,75..)
>   ;opt at bin_max =  50.
>   opt at bin_nice=True
>   pdf1 = pdfx(hist_anom1, 100, opt)
>   printVarSummary(pdf1)
>   pdf2 = pdfx(rcp45_anom1, 100, opt)
>   printVarSummary(pdf2)
>   pdf3 = pdfx(rcp85_anom1,100, opt)
>   printVarSummary(pdf3)
>
> ;================================================================================ 
>
> ; prepare data for plotting
> ;================================================================================ 
>
>
>   nVar    = 3
>   nBin    = pdf1 at nbins          ; retrieve the number of bins
>
>   xx      = new ( (/nVar, nBin/), typeof(pdf1))
>
>   xx(0,:) = pdf1 at bin_center     ; assign appropriate "x" axis values
>   xx(1,:) = pdf2 at bin_center
>   xx(2,:) = pdf3 at bin_center
>
>   yy      = new ( (/nVar, nBin/), typeof(pdf1))
>   yy(0,:) = (/ pdf1 /) * 0.01 ;; convert % to absolut
>   yy(1,:) = (/ pdf2 /) * 0.01
>   yy(2,:) = (/ pdf3 /) * 0.01
>
>
> ~~~Than plotting~~~~~
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200608/6ba2940e/attachment.html>


More information about the ncl-talk mailing list