Re: Common Xlabel with gsn_attach_plots

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 30 May 2008 15:18:14 -0600 (MDT)

Hi Louis,

Did you try:

   res_at_gsnAttachBorderOn = False

http://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnAttachBorderOn

As for a common X label, you will need to not set the individual
tiXAxisString resources, and then use gsn_text_ndc to place a
label exactly where you want it.

See the "warming" and "cooling" labels in example 3 at:

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

If you need to panel these kind of plots, however, then your best bet
is to use gsn_create_text to first create the text string, and then
gsn_add_annotation to attach it to the plot.

See the second figure of example 9 at:

   http://www.ncl.ucar.edu/Applications/text.shtml#ex9

--Mary

On Fri, 30 May 2008, louis Vonder wrote:

> Ncl users,
>
> I used "gsn_attach_plots" to concatenate two plots.
>
> But I don't know how to use common xlabel for the two plot.
>
> I am trying to remove the line between the two plots?
>
> Which part of my script can I touch to adjust my plot?
>
> Thanks
>
>
>
> ;=================================================;
> ; PLOT
> ;=================================================;
> wks = gsn_open_wks("eps", fili(n)) ; open a ps file
>
> 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
>
> ; gsn_define_colormap(wks,"gui_default") ; choose a colormap
>
> 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_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_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 = res_at_tmXBValues
> res_at_tmXBLabels = res_at_tmXBLabels
>
>
> res_at_tiMainString = " " ; add titles
> res_at_tiXAxisString = "LST"
> res_at_tiYAxisString = "Distance (Km)"
>
> res_at_tiMainFontHeightF = 0.05 ; change font heights
> res_at_tiXAxisFontHeightF = 0.015
> res_at_tiYAxisFontHeightF = 0.015
>
> res_at_gsnLeftString = " " ; add the gsn titles
> res_at_gsnCenterString = " "
> res_at_gsnRightString = " "
>
> 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 = False ; no bottom tickmarks
> res_at_tmXBLabelFontHeightF = 0.018
> res_at_tmBorderThicknessF = 3.0
>
> res_at_tmYROn = False
> res_at_tmYRBorderOn = False
> res_at_tmYRLabelsOn = False
>
> plot = gsn_csm_contour(wks, data, res) ; contour the variable
>
> res_at_tmYLOn = False
> res_at_tmYLBorderOn = False
> res_at_tmYLLabelsOn = False
>
> res_at_tmYROn = False
> res_at_tmYRBorderOn = True
> res_at_tmYRLabelsOn = False
>
> plot1 = gsn_csm_contour(wks, data, res) ; contour the variable
>
> newplot = gsn_attach_plots(plot, (/plot1/), res, res)
>
> draw(plot)
> frame(wks)
>
>
>
>
>

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 30 2008 - 15:18:14 MDT

This archive was generated by hypermail 2.2.0 : Fri May 30 2008 - 15:30:01 MDT