Re: adaptation of histo_9 ncl example script

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Tue May 21 2013 - 11:51:04 MDT

Hi Marston,
I don't see any reason why you cannot swap things out. Instead of
calling gsn_histogram, make a call to gsn_csm_xy..

See example #1 here:
http://www.ncl.ucar.edu/Applications/pdf.shtml#ex1

In histo_9.ncl note that datatondc is used to translate the
latitude/longitude coordinates of the map plot to NDC space so that one
can precisely specify the placement of the histogram via vpXF, vpYF,
vpWidthF and vpHeightF.

I would start off with swapping this line:
histogram = gsn_histogram(wks,x,histres)
for this one:
plot2 = gsn_csm_xy (wks, ap@bin_center, ap, histres)
(the above line assumes your pdf information is in an array named "ap"..)

Hope that helps. If not, or if you have further questions, please
respond to ncl-talk.
Adam

On 05/19/2013 10:03 AM, Marston Johnston wrote:
>
> Hi,
>
> Sorry for the double posting...
>
> I'm trying to adapt one of the NCL examples:
>
> http://www.ncl.ucar.edu/Applications/Scripts/histo_9.ncl
>
> In the NCL example histo_9.ncl, see link above,
> it offers to plot histograms onto a map of the globe.
> In this example, there is a line:
>
> histogram = gsn_histogram(wks,tp1d,histres)
>
> that both calculates the histogram for a 1D array and plots in at a
> certain lat lon coordinate on the map. I would like to exchange this
> function for the ability to plot the result of pdfx, another NCL
> function for plotting probability density function, on to a global
> map. It doesn't seem directly interchangeable and gsn_histogram seems
> tailored for this particular plot feature.
>
> Is it possible to plot the PDF instead of the histogram onto a global map?
>
> Thanks in advance,
> /M
> --
> Only the fruitful thing is true!
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 21 11:51:17 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT