- 积分
- 65
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2017-4-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 ekateril 于 2017-7-6 16:20 编辑
1.为什么设置为cnLevelSelectionMode = "ManualLevels"时,等值线可以显示,但色标会自动添加三个多余的,如左图所示,
2.设置cnLevelSelectionMode = "ExplicitLevels"时色标正常显示,但等值线没出来,不知为何?如右图所示
部分代码如下:
wks = gsn_open_wks("x11","sea-level_Pressure") ; open wk station
gsn_define_colormap(wks,"NCV_jaisnd") ; load color table
;;; Font Style
res1 = True ; plots modification on ; plot mods desired
res1@txFont = "Helvetica"
res1@txFontQuality = "High"
;;; Title 设置图片标题
;res1@tiMainFont = "ManualLevels"
res1@cnFillDrawOrder = "PreDraw"
res1@tiMainOffsetYF = 0.02 ;set place for main title alongY,offset
res1@tiMainFontHeightF = 0.02 ;set main title fontsize
res1@gsnLeftString = "Sea-level_Pressure"
res1@gsnRightString = "2017/06/16/00(UTC)" ;~S~o~N~C:表示温度单位℃
res1@gsnMaximize = True
res1@gsnDraw = False
res1@gsnFrame = False
res1@gsnSpreadColors = True
res1@pmTickMarkDisplayMode = "Always"
res1@mpGridAndLimbOn = True ; open grid
res1@mpGridLineDashPattern = 10
res1@mpGridLatSpacingF = 20
res1@mpGridLineThicknessF = 1.0
res1@mpGridLineColor = "grey"
res1@mpGridLatSpacingF = 20
res1@mpGridLonSpacingF = 20
;;; Map
res1@mpOutlineOn = True ; draw map outlines
res1@mpFillOn = True
res1@mpDataSetName = "Earth..4" ; high resolution
res1@mpDataBaseVersion = "MediumRes"
res1@mpProvincialLineColor = 0
res1@mpCountyLineColor = 2
;设置经纬度范围,亚洲范围经纬度
res1@mpLimitMode = "latlon"
res1@mpMinLatF = 7
res1@mpMaxLatF = 50
res1@mpMinLonF = 90
res1@mpMaxLonF = 135
res1@mpOutlineSpecifiers = (/"China:states"/)
res1@mpGeophysicalLineColor = "grey" ; color of cont. outlines
; thickness of outlines
;加粗边界线。
res1@mpGeophysicalLineThicknessF = 1. ; double the thickness of geophysical boundaries
;res1@mpNationalLineThicknessF = 1. ; double the thickness of national boundaries
;;; Map Projection (min and max Lon and Lat)
res1@gsnAddCyclic = False ; data already has cyclic point;为false表示不循环地球一周 ; this must also be set for any zoom
res1@mpProjection = "LambertConformal" ;兰伯特投影
res1@mpLambertMeridianF = 110
res1@mpLambertParallel1F = .001 ;default:.001
res1@mpLambertParallel2F = 89.999 ;default:89.999
;填充中国行政区域范围
;res1@mpAreaMaskingOn = True ;是表示能填充覆盖
;res1@mpMaskAreaSpecifiers = (/"China:states"/) ;China:states
res1@mpOceanFillColor = 0 ;用变色填充海洋 0是clormap的索引值
res1@mpLandFillColor = 0
res1@cnFillOn = True ; turn of color fill
res1@cnLinesOn = True ; turn of contour lines 显示等值线
res1@cnLineLabelsOn = True
res1@cnInfoLabelOn = False
res1@cnLevelSelectionMode = "ManualLevels" ; set explicit contour levels
;res1@cnMinLevelValF = 985 ;set min contour level
;res1@cnMaxLevelValF = 1029 ; set max contour level
;res1@cnLevelSpacingF = 2 ; set contour spacing
res1@cnMonoLineColor = False
res1@cnLineThicknessF = 2.5
;res1@cnFillPalette = "gui_default"
;res1@cnLineLabelInterval = 1
;;;label
res1@lbOrientation = "Vertical"
res1@tmXTOn = False
res1@tmYROn = False
res1@tmXBLabelFontHeightF = 0.035
res1@tmYLLabelFontHeightF = 0.0
;;; color fill tresholds and colors 设置图例的配色方案
res1@cnLevels = (/985,987.5,990,992.5,995,997.5,1017.5,\
1020,1022.5,1025,1027.5,1029/) ; set levels
res1@cnFillColors = (/ 225,210,201,190,175,137,0,\
75,60,50,40,33,26/) ; set the colors to be used
;;; label bars style
;;; if not set standard values are used.
;;; so you normally can delete these lines without any problems
;res1@lbAutoManage = False ; control label bar
res1@pmLabelBarDisplayMode = "Always" ; turns on label bar
res1@lbLabelAutoStride = True
res1@pmLabelBarWidthF = 0.08
res1@pmLabelBarHeightF = 0.65
res1@lbLabelFontHeightF = 0.015
res1@lbPerimOn = False
res1@lbLabelFont = "Helvetica" ; label font
res1@lbLabelStride = 1
res1@lbTitleOn = False ; turn on title
res1@lbLabelStrings = (/"985","987.5","990","992.5","995","997.5","1017.5",\
"1020","1022.5","1025","1027.5","1029"/)
|
|