[ncl-talk] colorbar_and_title_not_showing
Kunal Bali
kunal.bali9 at gmail.com
Sat Jun 11 13:03:03 MDT 2016
Dear NCL users,
I plotted the overlay map, in that the colorbar is coming properly and
title is also missing.
Could you please let me know the missing point
The script is written below
BR = a->BRFLUXV(26,:,:)
GPH = a1->H(26,0,:,:)
u = a2->uwnd(114,4,:,:)
v = a2->vwnd(114,4,:,:)
;---Open workstation and change color map
wks_type = "pdf"
;wks_type at wkPaperSize = "A4"
wks = gsn_open_wks(wks_type,"figure")
;;create plots;;
; gsn_define_colormap(wks,"BkBlAqGrYeOrReViWh200")
res = True
res at gsnDraw = False
res at gsnFrame = False
res at gsnMaximize = True
res at tmXTOn = False
res at tmYROn = False
res at gsnLeftString = ""
res at gsnRightString = ""
;;set map;;
mpres = res
mpres at mpDataSetName = "Earth..4"
mpres at mpDataBaseVersion = "MediumRes"
mpres at mpOutlineOn = True
mpres at mpOutlineSpecifiers = (/"india","nepal","china"/)
mpres at mpGeophysicalLineThicknessF = 2
mpres at mpNationalLineThicknessF = 2
mpres at mpFillDrawOrder = "PostDraw"
mpres at mpFillOn = True
mpres at mpMaskAreaSpecifiers =
(/"india","india","nepal","china"/)
;;set area;;
mpres at mpMinLonF = 65.0
mpres at mpMaxLonF = 98.0
mpres at mpMinLatF = 5.0
mpres at mpMaxLatF = 38.0
;;set contour;;
cnres = res
cnres at cnFillDrawOrder = "PreDraw"
cnres at cnFillOn = True
cnres at cnLinesOn = False
cnres at pmLabelBarWidthF = 0.4
cnres at pmLabelBarHeightF = 0.09
cnres at pmLabelBarOrthogonalPosF = 0.1
cnres at lbLabelFontHeightF = 0.009
cnres at lbLabelAngleF = 45
cnres at tiMainString = "26 April 2016 @700hpa"
cnres at cnLevelSelectionMode = "ExplicitLevels" ; set explicit
contour levels
cnres at cnLevels = (/0, 1e-06, 2e-06, 3e-06, 4e-06,
5e-06, 7e-06, 8e-06, 9e-06/)
cnres at cnFillPalette = "WhBlGrYeRe"
resL = res
resL at cnFillOn = False ; turn on contour fill
resL at cnLinesOn = True ; turn off contour lines
resL at cnLineLabelsOn = True ; turn off line labels
resL at cnLineThicknessF = 3.
resL at cnLineColor = "red"
;;set vector;;
res_vc = res
res_vc at vcGlyphStyle = "LineArrow"
res_vc at vcLineArrowThicknessF = 0.01
res_vc at vcMinDistanceF = 0.001
res_vc at vcRefLengthF = 0.085
res_vc at vcRefAnnoOn = True
res_vc at vcRefAnnoString2On = False
res_vc at vcRefAnnoPerimOn = False
res_vc at vcRefAnnoOrthogonalPosF = -0.12
res_vc at vcRefAnnoParallelPosF = 0.999
res_vc at vcRefAnnoBackgroundColor = "Purple"
res_vc at vcVectorDrawOrder = "PostDraw"
res_vc at gsnRightString = "Wind"
;;plot;;
map = gsn_csm_map(wks,mpres)
bc = gsn_csm_contour(wks,BR,cnres)
geopot = gsn_csm_contour(wks,GPH,resL)
vector = gsn_csm_vector(wks,v,u,res_vc)
;;overlay filled contours and vectors on the map;;
overlay(map,bc)
overlay(map,vector)
overlay(map,geopot)
;;drawing "map" will draw everything: map, contours, vectors, and text;;
draw(map)
frame(wks)
end
Regards
Kunal Bali
Research Scholar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160612/2d9c65b4/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: figure.pdf
Type: application/pdf
Size: 182312 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160612/2d9c65b4/attachment.pdf
More information about the ncl-talk
mailing list