<div dir="ltr"><div>Perhaps, looking at the 'pdfx' function code will help:</div><div> %> less "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div>---<br></div><div>Or, you could extract the code and rename the function and add some print statements.<br></div><div><br></div><div>---</div><div>I wrote this function but, currently, I do not have the time to look.</div><div><br></div><div>Good Luck</div><div>Stay Healthy<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 8, 2020 at 4:05 AM Sri nandini via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Could someone please advice me on the following?<br>
</p>
<div>On 05.06.20 09:28, Sri nandini via
ncl-talk wrote:<br>
</div>
<blockquote type="cite">Hello
ncl users,
<br>
<br>
I have a question on plotting my PDF, which changes (as it should)
with specific bin_nice and without.
<br>
<br>
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.
<br>
<br>
I don't understand why bin space and values change, can some one
help me understand this?
<br>
<br>
Thanx Sri
<br>
<br>
~~~~~ snippet of the main PDF code~~~~
<br>
<br>
<br>
print("calculate PDFs...")
<br>
;; calculate empirical PDF
<br>
<br>
opt = True
<br>
;opt@bin_min = -50. (i have also tried it with 100,75..)
<br>
;opt@bin_max = 50.
<br>
opt@bin_nice=True
<br>
pdf1 = pdfx(hist_anom1, 100, opt)
<br>
printVarSummary(pdf1)
<br>
pdf2 = pdfx(rcp45_anom1, 100, opt)
<br>
printVarSummary(pdf2)
<br>
pdf3 = pdfx(rcp85_anom1,100, opt)
<br>
printVarSummary(pdf3)
<br>
<br>
;================================================================================
<br>
; prepare data for plotting
<br>
;================================================================================
<br>
<br>
nVar = 3
<br>
nBin = pdf1@nbins ; retrieve the number of bins
<br>
<br>
xx = new ( (/nVar, nBin/), typeof(pdf1))
<br>
<br>
xx(0,:) = pdf1@bin_center ; assign appropriate "x" axis
values
<br>
xx(1,:) = pdf2@bin_center
<br>
xx(2,:) = pdf3@bin_center
<br>
<br>
yy = new ( (/nVar, nBin/), typeof(pdf1))
<br>
yy(0,:) = (/ pdf1 /) * 0.01 ;; convert % to absolut
<br>
yy(1,:) = (/ pdf2 /) * 0.01
<br>
yy(2,:) = (/ pdf3 /) * 0.01
<br>
<br>
<br>
~~~Than plotting~~~~~
<br>
<br>
<br>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
ncl-talk mailing list
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></pre>
</blockquote>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>