Re: labelbars and panels

From: Adam Phillips (asphilli AT XXXXXX)
Date: Tue Aug 06 2002 - 09:37:32 MDT

  • Next message: Mary Haley: "Re: labelbars and panels"

    Dave,

    For polar plots, the longitude labels are controlled by txFontHeightF. And,
    coincidentally, gsnCenterString, gsnLeftString, and gsnRightString are also
    controlled by txFontHeightF.. I am still working on your label bar question...

    Adam

    > Date: Tue, 6 Aug 2002 11:29:21 -0400
    > From: David Reusch <dbr@essc.psu.edu>
    > To: Adam Phillips <asphilli@cgd.ucar.edu>
    > Cc: nicl-talk@ucar.edu
    > Subject: Re: labelbars and panels
    > Mime-Version: 1.0
    > Content-Disposition: inline
    > User-Agent: Mutt/1.3.27i
    >
    > On Tue, Aug 06, 2002 at 09:15:57AM -0600, Adam Phillips wrote:
    > >Are you putting the pmLabelBarOrthogonalPosF resource in your panel resource
    > >list (and not in your plot resource list)?
    > Yes.
    >
    > >If you are, can you reply with a copy
    > >of the plotting section of your program so we can all see it?
    > Sure, but first maybe you can tell me why the line below doesn't
    > change the size of longitude labels on my polar plot?
    >
    > res@mpLabelFontHeightF = 0.05 ; doesn't work!
    >
    > I've also been unable to change the size of the gsnCenterStrings
    > in each plot.
    >
    > Anyway, here's the script (and thanks for all your patience
    > with the newbie!). -dave
    >
    > load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
    > load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_csm.ncl"
    > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
    > begin
    > Z700=asciiread("Zsub.txt",(/721/),"float")
    > ll=asciiread("EASEsub.txt",(/721,2/),"float")
    > d0 = ll(:,0)
    > d1 = ll(:,1)
    > znew = idsfft( d0, d1, Z700, (/30,30/) )
    > znew!0="lat"
    > znew!1="lon"
    > znew&lat@units="degrees_north"
    > znew&lon@units="degrees_east"
    >
    > ; xwks = gsn_open_wks( "x11","test2") ; Open an X11 workstation.
    > pswks = gsn_open_wks( "ps","test2") ; Open a PS workstation.
    >
    > ; gsn_define_colormap(xwks,"temp1") ; choose colormap
    > gsn_define_colormap( pswks,"temp1") ; just opened.
    >
    > res = True
    > res@gsnDraw = False ; do not draw picture
    > res@gsnFrame = False ; do not advance frame
    > res@gsnPolar = "SH"
    > res@gsnSpreadColors = True ; use full colormap
    >
    > res@cnFillOn = True ; turn on color
    > res@cnInfoLabelOn = False ; turn label off
    >
    > res@mpFillOn = False
    > res@mpDataBaseVersion = "Ncarg4_1"
    > res@mpOutlineOn = True
    > res@mpMaxLatF = max(znew&lat) ; zoom in on region
    > res@mpGridLatSpacingF = 10
    > ; res@mpLabelFontHeightF = 0.05 ; doesn't work!
    >
    > res@lbLabelBarOn = False ; turn off the label bar
    > res@lbLabelAngleF = 45
    > res@lbTitleFontHeightF= .015
    > ; res@lbLabelStride = 2 ; stride on label bar
    >
    > res@vpYF = 0.9
    >
    > ;************************************************
    > ; individual plots
    > ;************************************************
    > plot = new(15,graphic) ; create graphics array
    >
    > ; create a 3x5 array of plots. use the same one for
    > ; now, until it works.
    > do n=0,14
    > res@gsnCenterString = "Plot " + n
    > ; plot(n) = gsn_csm_contour_map_polar(xwks,znew,res)
    > plot(n) = gsn_csm_contour_map_polar(pswks,znew,res)
    > end do
    >
    > ;************************************************************
    > ; now create panel plot with its own resources
    > ;************************************************************
    > resPanel = True ; panel mods desired
    > resPanel@gsnFrame = False ; do not advance frame
    > resPanel@gsnPanelBottom = 0.05
    > resPanel@gsnPanelLabelBar= True ; label bar on panel
    > resPanel@gsnMaximize = False ; fill up the page
    > resPanel@gsnPaperOrientation = "auto"
    > resPanel@gsnPanelYWhiteSpacePercent = 3
    > resPanel@gsnPanelXWhiteSpacePercent = 3
    >
    > resPanel@txString = "Z700 Annual Average"
    > resPanel@lbLabelAngleF = 45
    > resPanel@lbTitleOn = True ; turn on title
    > resPanel@lbTitleString = "700 mb Geopotential Height"
    > resPanel@lbTitleFontHeightF= .01
    > resPanel@lbAutoManage= False
    > resPanel@lbLabelFontHeightF= .01
    > resPanel@pmLabelBarOrthogonalPosF = .10
    > ; gsn_panel(xwks,plot,(/3,5/),resPanel) ; draw: 3-down , 5-across
    > gsn_panel(pswks,plot,(/3,5/),resPanel) ; draw: 3-down , 5-across
    > frame(pswks)
    >
    > end

    -------------------------------------------------------------
    Adam Phillips email: asphilli@ucar.edu
    Climate and Global Dynamics Division tel: (303) 497-1726
    National Center for Atmospheric Research fax: (303) 497-1333
    P.O. Box 3000
    Boulder, CO 80307-3000 http://www.cgd.ucar.edu/~asphilli

    _______________________________________________
    ncl-talk mailing list
    ncl-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Tue Aug 06 2002 - 09:51:16 MDT