Re: X-values not shown in zonal mean plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 22 2010 - 09:33:36 MDT

Hi Julianne,

You don't have much control over that zonal means plot when you
create it use the gsnZonalMeans resource.

To have more control, you can use the gsn_csm_attach_zonal_means
function. This allows you to set whatever
resources you'd like for the zonal means plot.

Please see example 7 at:

http://www.ncl.ucar.edu/Applications/zonal.shtml

This will show you how to force more tickmarks.

--Mary

On Mar 22, 2010, at 3:31 AM, Juliane Otto wrote:

> Hi,
>
> I am using gsn_csm_contour_map_ce to draw a contour plot with
> gsnZonalMean set to 'True' to draw a zonal mean XY plot next to the
> main
> plot. With gsnZonalMeanXMaxF and gsnZonalMeanXMinF//
> <http://www.ncl.ucar.edu/Document/Graphics/Resources/
> gsn.shtml#gsnZonalMeanXMinF>
> I changed the X-axis of the zonal average plot. This works fine.
> However, the values do not appear at the X-axis in the plot. I
> tried to
> solve this by changing the font size (res@tmXBLabelFontHeightF) but
> this
> doesn't help. I assume that there is not enough space for NCL to draw
> beside the 0.00 the value 0.15. Does anyone know how to solve this?
>
> Thanks,
> Juliane
>
>
> <forest_cover_Vwoh_zonmean.ps>;plot different pfts
>
> load "/sw/sarge-ia32/ncarg-4.4.1s/lib/ncarg/nclscripts/csm/
> gsn_code.ncl"
> load "/sw/sarge-ia32/ncarg-4.4.1s/lib/ncarg/nclscripts/csm/
> gsn_csm.ncl"
> load "/sw/sarge-ia32/ncarg-4.4.1s/lib/ncarg/nclscripts/csm/
> contributed.ncl"
>
> begin
>
> path4="/scratch/local2/m220065/cosmos-landveg-no-nitrogen_2009-
> SEP-03/Vwoh/results/"
> pathout="/scratch/local2/m220065/cosmos-landveg-no-nitrogen_2009-
> SEP-03/results/"
> time="annual/"
> pft="forest"
> filename=pft + "_cover_Vwoh_zonmean"
>
>
> Vwoh = addfile(path4 + "jot0029-
> jot0012_329001.01_jsbach_12_ratio.nc","r")
>
>
>
> wks = gsn_open_wks("ps",pathout + time + filename) ; Open
> postscript workstation
>
>
>
> gsn_define_colormap(wks,"testcmap")
>
>
>
> res = True ; Plot options desired
> res@gsnDraw = False
> res@gsnFrame = False
>
>
> res@mpMinLatF = 40 ; from which latitude
> res@mpMaxLatF = 90 ; from which latitude
>
>
>
> res@mpGridLonSpacingF = 60 ; Number of longitudes,
> res@mpGridLatSpacingF = 20 ; specifies the spacing
> grid lines
> res@gsnTickMarksOn = True ; turn off longitudes labels
> res@cnFillOn = True ; Turn on contour fill.
> res@cnLinesOn = False ; Turn off contour lines.
>
> res@lbBoxLinesOn = False ; Turn off labelbar lines.
> res@cnLineLabelsOn = False ; Turn off line labels
> res@lbLabelBarOn = False ; Turn off labelbar
> res@cnInfoLabelOn = False ; Turn off
> informational label
> res@cnFillMode = "RasterFill" ; only boxes with
> colours
>
> res@tmXTOn = False ; Turn off the top tickmarks
> res@tmYROn = False ; Turn off the right
> tickmarks
>
> res@tmXBLabelFontHeightF = 0.012
> res@tmYLLabelFontHeightF = 0.012
> res@gsnZonalMeanXMinF = -0.15 ; min X-axis value for
> zonal mean plot
> res@gsnZonalMeanXMaxF = 0.15 ; max X-axis value for
> zonal mean plot
>
>
>
> res@gsnZonalMean = True ; Draw a Zonal mean
> res@gsnAddCyclic = False ; Data already
> has cyclic point
>
>
> res@cnLevelSelectionMode= "ManualLevels" ; manual set
> levels
> res@cnMinLevelValF = -0.5 ; min
> level
> res@cnMaxLevelValF = 0.5 ; max level
> res@cnLevelSpacingF = 0.025 ; contour
> interval
> res@gsnSpreadColors = True
>
> plots = new(3,graphic)
> plots(0) = gsn_csm_contour_map_ce(wks,Vwoh->var12(0,2,:,:),res)
>
>
> plots(1) = gsn_csm_contour_map_ce(wks,Vwoh->var12(0,3,:,:),res)
>
>
> plots(2) = gsn_csm_contour_map_ce(wks,Vwoh->var12(0,6,:,:),res)
>
>
>
>
> panelres = True ; plotting several plots
>
>
>
>
> panelres@gsnPanelFigureStrings = (/"a","b","c"/)
>
>
>
>
> panelres@gsnPanelFigureStringsFontHeightF = 0.019 ; size of box
> panelres@amJust = "TopLeft"
> panelres@gsnPanelRowSpec = True ; specifies number of
> rows
> panelres@pmLabelBarWidthF =
> 0.9 ; make thinner
> panelres@pmLabelBarHeightF = 0.1
> panelres@pmLabelBarOrthogonalPosF = -0.03
> panelres@lbLabelFontHeightF = 0.023
> panelres@gsnPanelLabelBar = True ; draw one colourbar
> panelres@lbLabelAutoStride = True
> ; panelres@gsnMaximize = True
>
>
>
> gsn_panel(wks,plots,(/1,1,1/),panelres) ; draw all plots and
> colourbar
>
>
> end
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 22 09:34:41 2010

This archive was generated by hypermail 2.1.8 : Sat Mar 27 2010 - 07:18:15 MDT