Hi all.
Is it possible to display a different set of Labels on the two x-labels
in ncl plots ?
I tried, but the results is no labels or the same labels in both x-axes.
My script:
wks = gsn_open_wks("ps","trans") ; open a ps file
gsn_define_colormap(wks,"BlAqGrYeOrReVi200") ; choose colormap
res = True ; plot mods desired
res@tmXBMode = "Explicit" ; explicitly label x-axis
res@tmXTMode = "Explicit" ; explicitly label x-axis
res@tmYLMode = "Explicit" ; explicitly label y-axis
res@tmXTLabelsOn = True
res@gsnFrame = False ; don't turn page yet
res@gsnDraw = False ; don't draw yet
res@tmXTValues = (/0,1/) ; points to label
res@tmXTLabels = (/leftlat+"N ~C~"+leftlon+"E",rightlat+"N
~C~"+rightlon+"E"/)
res@tmXBValues = (/points(0),points(npt-1)/) ; points to
label
res@tmXBLabels = (/0,ceil(dist/1000)/)
res@tmYLValues = zdpth
res@tmYLLabels = ""+zdpth
res@cnFillOn = True ; turn on color
res@cnMissingValFillPattern = 0 ; these two resource to plot
missing values in black
res@cnMissingValFillColor = "black" ;
res@lbLabelAutoStride = True ; nice label bar label stride
res@gsnSpreadColors = True ; use full range of colormap
res@cnLinesOn = False ; turn off countour lines
res@lbOrientation = "Horizontal" ; Horizontal label bar
res@pmLabelBarOrthogonalPosF = -0.05 ; move label bar closer
to plot
res@tiMainString = "Transect" ; add title
res@trYReverse = False ; don't reverse y axis
res@gsnYAxisIrregular2Linear = True
res@vpHeightF = 0.4
res@vpWidthF = 0.8
res@vpXF = 0.10
res@lbBoxMajorExtentF = 1 ; relative dimension of the
boxes
res@lbBoxMinorExtentF = 0.2
res@tmYROn = False
;res@tmXTOn = False
res@tmYLMinorOn = False
res@tmYLLabelStride = 4
res@tmXBMajorLengthF = 0.002
res@tmYLMajorLengthF = 0.002
res@tmXBMinorLengthF = 0.001
res@tmYLMinorLengthF = 0.001
res@tmXTMajorLengthF = 0.002
res@tmYRMajorLengthF = 0.002
res@tmXTMinorLengthF = 0.001
res@tmYRMinorLengthF = 0.001
res@tmXBLabelFontHeightF = 0.016
res@tmYLLabelFontHeightF = 0.016
res@lbLabelFontHeightF = 0.016
res@cnLevelSpacingF = 0.15 ; set contour spacing
plot = gsn_csm_contour(wks,temp(zlev|:,point|:),res) ; create plot
Result:
If i invert the array assignment between XTLabels and XBLabels, labels
changes, but however both axes have the same labels.
Could you help me ?
Thanks, Marco
--
### ### ### ### ###
MARCO PASTORE
Istituto Nazionale di Geofisica e Vulcanologia
Gruppo Nazionale di Oceanografia Operativa
Viale Aldo Moro 44
40128, Bologna
Tel:(+39)051-3782649
Cel:(+39)339 8273965
Skype: mapas71
### ### ### ### ###
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 19 2008 - 06:41:11 MDT