dear Users,
I was trying to position the labelbar of a filled (shaded) contour
plot using pmLaberBarParallelPosF etc resources. There are multiple
panels positioned by vpXF etc resources. A single vertical labelbar is
desired. Surprisingly, the vertical (y) position of the plot title is
shifted up when the upper edge of the labelbar crosses the upper edge of
the panel. For now, I could fix the problem by positioning the labelbar
against a panel which is in the upper row with a negative value for
pmLabelBarParallelPosF, but posting this mail to know if there's any
inconsistency in the resources settings in my script. I'm attaching an
example script to illustrate the problem. Thanks in advance for any help.
regards,
arindam
-- ---------------------------- ARINDAM CHAKRABORTY Department of Meteorology Florida State University Tallahassee, FL-32306, USA Tel: 850-644-3524 (Dept) 850-524-0717 (Cell) Fax: 850-644-9642 ____________________________
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"
begin
fps = "test"
ncolor = 30
cmap = new((/ncolor+1,3/),"float")
do i = 0, ncolor
rgbval = (ncolor-i)*1.0/ncolor
cmap(i,:) = (/rgbval,rgbval,rgbval/)
end do
cmap(0,:) = (/1,1,1/)
cmap(1,:) = (/0,0,0/)
; type = "ps"
; type_at_wkColorMap = cmap
; wks = gsn_open_wks(type,fps);
type = "X11"
type_at_wkColorMap = cmap
wks = gsn_open_wks(type,fps);
nx = 10
ny = 10
arr = new((/ny,nx/),"float")
do j = 0, ny-1
do i = 0, nx-1
arr(i,j) = i+j
end do
end do
printVarSummary(arr)
resp = True
resp_at_gsnDraw = True
resp_at_gsnFrame = False
resp_at_vpWidthF = 0.20
resp_at_vpHeightF = 0.20
resp_at_cnFillOn = True
resp_at_cnSmoothingOn = True
resp_at_cnLinesOn = False
resp_at_cnLineLabelsOn = False
resp_at_cnInfoLabelOn = False
; 1
resp_at_vpXF = 0.05
resp_at_vpYF = 0.85
resp_at_lbLabelBarOn = True
resp_at_lbOrientation = "Vertical"
; resp_at_pmLabelBarWidthF = 0.05
; resp_at_pmLabelBarHeightF = 0.30
; resp_at_pmLabelBarParallelPosF = 0.89
; resp_at_pmLabelBarOrthogonalPosF = 0.0
resp_at_tiMainString = "TITLE, Proper Place"
cnt = gsn_csm_contour(wks,arr,resp)
; 2
resp_at_vpXF = 0.35
resp_at_vpYF = 0.85
resp_at_lbLabelBarOn = True
resp_at_lbOrientation = "Vertical"
; resp_at_pmLabelBarWidthF = 0.05
resp_at_pmLabelBarHeightF = 0.30
; resp_at_pmLabelBarParallelPosF = 0.89
; resp_at_pmLabelBarOrthogonalPosF = 0.0
resp_at_tiMainString = "TITLE, Shifted Up"
cnt = gsn_csm_contour(wks,arr,resp)
; 3
resp_at_vpXF = 0.65
resp_at_vpYF = 0.85
resp_at_lbLabelBarOn = True
resp_at_lbOrientation = "Vertical"
; resp_at_pmLabelBarWidthF = 0.05
resp_at_pmLabelBarHeightF = 0.10
; resp_at_pmLabelBarParallelPosF = 0.89
; resp_at_pmLabelBarOrthogonalPosF = 0.0
resp_at_tiMainString = "TITLE, Proper Place"
cnt = gsn_csm_contour(wks,arr,resp)
; 4
resp_at_vpXF = 0.05
resp_at_vpYF = 0.45
resp_at_lbLabelBarOn = True
resp_at_lbOrientation = "Vertical"
; resp_at_pmLabelBarWidthF = 0.05
resp_at_pmLabelBarHeightF = 0.10
resp_at_pmLabelBarParallelPosF = 1.0
; resp_at_pmLabelBarOrthogonalPosF = 0.0
resp_at_tiMainString = "TITLE, Shifted Up"
cnt = gsn_csm_contour(wks,arr,resp)
; 5
resp_at_vpXF = 0.35
resp_at_vpYF = 0.45
resp_at_lbLabelBarOn = True
resp_at_lbOrientation = "Vertical"
; resp_at_pmLabelBarWidthF = 0.05
resp_at_pmLabelBarHeightF = 0.25
resp_at_pmLabelBarParallelPosF = -0.5
; resp_at_pmLabelBarOrthogonalPosF = 0.0
resp_at_tiMainString = "TITLE, Proper Place"
cnt = gsn_csm_contour(wks,arr,resp)
; 6
resp_at_vpXF = 0.65
resp_at_vpYF = 0.45
resp_at_lbLabelBarOn = True
resp_at_lbOrientation = "Vertical"
resp_at_pmLabelBarWidthF = 0.1
resp_at_pmLabelBarHeightF = 0.35
resp_at_pmLabelBarParallelPosF = 0.7
resp_at_pmLabelBarOrthogonalPosF = 0.05
resp_at_tiMainString = "TITLE, Shifted Up"
cnt = gsn_csm_contour(wks,arr,resp)
frame(wks)
end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 02 2008 - 15:08:44 MST
This archive was generated by hypermail 2.2.0 : Mon Jan 07 2008 - 11:19:46 MST