Louis,
I haven't reproduced your problem, but I think what's happening
is that the calculation of the various font heights is done
based on both the X/Y axis font heights, and the X/Y tickmark label
font heights.
The X tick labels are being set to 0.018, and the Y tick labels
are being set to 0.02, and this might be throwing things off.
Can you send me your data files by any chance? I can provide
an ftp site if necessary.
Thanks,
--Mary
On Thu, 12 Jun 2008, louis Vonder wrote:
> Hi Ncl users,
>
> I used the following script to attach plot.
> But when I am trying to increase "X axis" font height,
> It just work for the first panel.
>
> Thanks for help.
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>
> begin
> ;************************************************
> ; read in netCDF file
> ;************************************************
> a1 = addfile("Trans_XMAT_3E_1_5N_45p.nc", "r")
> a2 = addfile("Trans_XMAT_7E_1_5N_40p.nc", "r")
> a3 = addfile("Trans_XMAT_9E_1_5N_35p.nc", "r")
>
>
> fc1=a1->FC
> fc2=a2->FC
> fc3=a3->FC
>
>
> ; fc1_at_long_name = "Fractional coverage"
>
>
> dist = fc1&distance
>
> fc1&distance_at_long_name = "Distance (Km)"
> fc2&distance_at_long_name = "Distance (Km)"
> fc3&distance_at_long_name = "Distance (Km)"
>
> ; lat = fc1&lat
> ; lon = fc1&lon
> ; nlat = dimsizes(lat)
> ; nlon = dimsizes(lon)
>
> ;************************************************
> ; create plots
> ;************************************************
> wks = gsn_open_wks("eps", "panel_transect") ; open a ps file
> ; gsn_define_colormap(wks,"gui_default") ; choose colormap
>
> gsn_define_colormap(wks,"gsltod")
> i = NhlNewColor(wks, 0.7, 0.7, 0.7) ; add gray to colormap
> setvalues wks
> "wkColorMap" : "gsltod"
> "wkForegroundColor" : (/0., 0., 0./)
> "wkBackgroundColor" : (/1., 1., 1./)
> end setvalues
>
> xplot = new(3, graphic) ; create a plot array
>
>
> res = True
>
> res_at_gsnDraw = False ; don't draw yet
> res_at_gsnFrame = False ; don't advance frame yet
>
> res_at_cnFillOn = True ; turn on color
> res_at_gsnSpreadColors = True ; use full range of colormap
> res_at_cnInfoLabelOn = False
> res_at_cnInfoLabelPerimOn = False
> res_at_cnLinesOn = False
> res_at_cnLineLabelsOn = False
>
> ; res_at_cnLevelSelectionMode = "AutomaticLevels" ; set manual contour levels
>
> res_at_gsnSpreadColors = True ; use full color map
> res_at_gsnSpreadColorEnd = -3 ; don't use added gray
> res_at_lbOrientation = "Vertical" ; vertical label bar
>
> res_at_lbLabelBarOn = False
> res_at_pmLabelBarOrthogonalPosF = -0.01 ; move label bar closer
> res_at_lbLabelStride = 1
> res_at_cnLevelSelectionMode = "ManualLevels" ; manual levels
> res_at_cnMinLevelValF = 2
> res_at_cnMaxLevelValF = 34
> res_at_cnLevelSpacingF = 4
> res_at_lbLabelFontHeightF = 0.02
>
> res_at_lbOrientation ="vertical" ; vertical label bar
>
> res_at_tmXTMode = "Automatic"
>
>
> ; res_at_tmXBMode = "Explicit" ; label independently
> ; res_at_tmXBValues = (/2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46/)
> ; res_at_tmXBLabels = (/"12", "14", "16", "18", "20", "22", "00", "02", "04", "06", "08", "10"/)
>
> res_at_tmXBMode = "Explicit" ; label independently
> res_at_tmXBValues = (/2, 8, 14, 20, 26, 32, 38, 44/)
> res_at_tmXBLabels = (/"12", "15", "18", "21", "00", "03", "06", "09"/)
>
>
> ; res_at_tmXTMode = "Explicit" ; label independently
> ; res_at_tmXTValues = res_at_tmXBValues
> ; res_at_tmXTLabels = res_at_tmXBLabels
>
> res_at_tmXUseBottom = False ; Keep top axis independent of bottom.
> res_at_tmXBLabelsOn = True ; have tick mark labels
> res_at_tmXTLabelsOn = False ; have tick mark labels
> res_at_tmXTOn = True ; no bottom tickmarks
> res_at_tmXBLabelFontHeightF = 0.018
> res_at_tmBorderThicknessF = 2.0
> res_at_tmYLLabelFontHeightF = 0.02
>
>
> res_at_tmYMajorGrid = True ; Turn on vertical lines
> res_at_tmYMajorGridThicknessF = 0.1
> res_at_tmYMajorGridLineDashPattern = 2
>
> res_at_tmXMajorGrid = True ; Turn on vertical lines
> res_at_tmXMajorGridThicknessF = 0.1
> res_at_tmXMajorGridLineDashPattern = 2
>
>
> res_at_tiMainString = " " ; add titles
> res_at_tiXAxisString = " "
> ;res_at_tiYAxisString = "Distance (Km)"
>
> ; res_at_tiMainFontHeightF = 0.05 ; change font heights
> ; res_at_tiXAxisFontHeightF = 0.015
> ; res_at_tiYAxisFontHeightF = 0.06
>
> res_at_gsnLeftString = " " ; add the gsn titles
> res_at_gsnCenterString = " "
> res_at_gsnRightString = " "
>
> res_at_tmYLLabelFontHeightF = 0.03
>
> res_at_tmYROn = False
> res_at_tmYRBorderOn = False
> res_at_tmYRLabelsOn = False
>
>
> res_at_tmXTOn = False ; no bottom tickmarks
> res_at_tmXBOn = True
>
>
> plot11 = gsn_csm_contour(wks, fc1, res) ; contour the variable
> plot12 = gsn_csm_contour(wks, fc2, res) ; contour the variable
> plot13 = gsn_csm_contour(wks, fc3, res) ; contour the variable
>
>
> delete(res_at_tmXBLabelFontHeightF)
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> res_at_tmYROn = True
> res_at_tmYRBorderOn = True
> res_at_tmYRLabelsOn = False
> res_at_tmXBLabelFontHeightF = 0.018
>
> plot21 = gsn_csm_contour(wks, fc1, res) ; contour the variable
> plot22 = gsn_csm_contour(wks, fc2, res) ; contour the variable
> plot23 = gsn_csm_contour(wks, fc3, res) ; contour the variable
>
> ; res1_at_gsnAttachBorderOn = False
>
>
>
>
> attachres1 = True
> attachres2 = True
> attachres3 = True
>
> attachres1_at_gsnAttachBorderOn = False
>
> attachres1_at_gsnAttachPlotsYAxis = True ; attaches along x-axis
> attachres1_at_tmBorderThicknessF = 2.0
> attachres1_at_tmYLLabelFontHeightF = 0.02
> attachres1_at_tiMainFontHeightF = 0.05 ; change font heights
> attachres1_at_tiXAxisFontHeightF = 0.02
> attachres1_at_tiYAxisFontHeightF = 0.025
> attachres1_at_tiYAxisString = "Distance (Km)"
> attachid1 = gsn_attach_plots( plot11, plot21, attachres1, attachres2)
>
>
>
> ; gsn_panel(wks, (/plot11, plot12, plot13/), (/3, 1/), False)
> gsn_panel(wks, (/plot11/), (/1, 1/), False)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
>
>
> frame(wks)
>
> end
>
>
>
_____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 12 2008 - 11:51:10 MDT
This archive was generated by hypermail 2.2.0 : Fri Jun 13 2008 - 16:48:10 MDT