Re: Zonal plot attributes

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Mar 23 2012 - 13:31:39 MDT

Hi Noel,
1) set res@gsnLeftString = "" and res@gsnRightString = "", then use a
call to gsn_text_ndc to draw your text. See:
http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_text_ndc.shtml
Note though that you have to call frame after you use gsn_text_ndc.

So your coding could be something like this:
res@gsnLeftString = ""
res@gsnRightString = ""
plot(i) = gsn_csm_lat_time(wks, Pzone, res )
pres = True ; Set panel resources.
pres@gsnPanelLabelBar = True ; Turn on panel labelbar.
pres@lbLabelStride = 1 ; print every label marker
pres@lbLabelFontHeightF = 0.008 ; label font height
pres@gsnFrame = False ; do not advance the frame
gsn_panel(wks,plot,(/5,5/),pres)

txres = True
txres@txFontHeightF = 0.012
dum = gsn_text_ndc(wks,"Precipitation (mm/month)",0.5,0.20,txres
frame(wks)

Note that when using any of the *_ndc functions it may be helpful to use
drawNDCGrid to get an idea where your NDC coordinates on your page are:
http://www.ncl.ucar.edu/Document/Functions/Shea_util/drawNDCGrid.shtml

2) Set res@trYMinF = -12 and res@trYMaxF = 10
See axes examples 3 and 4 here:
http://www.ncl.ucar.edu/Applications/axes.shtml#ex3

3) res@cnInfoLabelOn = False
See axes example 2 here:
http://www.ncl.ucar.edu/Applications/axes.shtml#ex2

4) I'm not totally sure what you're asking for with this. The example
coding you sent draws a single plot using gsn_panel. I'll assume that
you wish to draw 25 plots (as your gsn_panel call indicates), and wish
to label the rows and columns. If you want to labels to be on the
outside of the plots, then use gsn_text_ndc. If you wish to place a
label inside each plot you can do so with gsnPanelFigureStrings, see
example 5 here:
http://www.ncl.ucar.edu/Applications/panel.shtml#ex5

Hope that helps. If not, please let ncl-talk know.
Adam

On 03/23/2012 12:49 PM, Noel Aloysius wrote:
> Hi,
>
> I am creating a panel of zonal plots (25 in all). I want to get rid of
> some of the details that show up on each of the plot. I was successful
> in most but there are a few that I am not sure how to.
>
> A sample script and plot are attached.
>
> 1. remove the plot heading (Precipitation mm/month) and add this info
> just below the legend
> 2. restrict the latitude range to -12 to 10 (in the actual data
> selection the range is ~ -15 to 12)
> 3. remove the contour labels and its legend at the right bottom of each plot
> 4. Add row and column titles. Column names as
> (/"CM1","CM2","CM3","CM4","CM5"/) and row names as
> (/"R1","R2","R3","R4",R5"/)
>
> Thank you in advance,
>
> Noel
>
>
>
> _______________________________________________
> 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 Fri Mar 23 13:31:50 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 08:50:24 MDT