爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6412|回复: 1

求助!X轴上坐标轴刻度值调不了

[复制链接]
发表于 2020-9-28 16:16:41 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
      想要把x轴的主刻度值和次刻度值标在上面的坐标轴上,不用下面的坐标轴。但是majorvalues 和 minorvalues 总是不按我设置的来,而且修改刻度线粗细的命令也不起作用,就是关于tmXT有关的一切属性都不起作用,请问这是咋回事,怎么才能对其进行修改
     谢谢~

图:
          1.jpg
程序:
begin

  sizeF = 0.017;0.018
  thicknessF    =  2.5;2

  latmin     = 18  
  latmax     = 36  
  lonmin     = 97
  lonmax     = 122

  path_out  = "./"
  pic_name  = "pop_provin2010_forlun_0"

  ;typ   = "x11"
  ;typ  = "pdf"
  typ   = "eps"
  ;typ   = "png"

  wks   = gsn_open_wks (typ,path_out+pic_name)         
  base  = new(1,graphic)
  plot2 = new(1,graphic)
  gsn_define_colormap(wks,"precip_diff_12lev")  

;----------------2.1 mp range  
  res             = True                                          ; plot mods desired
  res@gsnDraw     = False
  res@gsnFrame    = False                                         ; don't advance yet
  ;res@gsnMaximize = True
  ;res@gsnAddCyclic  = False
  res@gsnLeftString        =""                                    ;图左上的数据信息
  res@gsnRightString       =""                                    ;图右上的数据信息

;---------------- for the axis 坐标轴,标签等
  res@tmXTOn            = True
  res@tmXTBorderOn      = True

  res@tmXTLabelsOn      = True
  res@tmXTMode          = "Explicit"
  res@tmXTValues        = (/98,102,106,110,114,118,122/)
  res@tmXTLabels        = (/"98~S~o~N~E","102~S~o~N~E","106~S~o~N~E","110~S~o~N~E","114~S~o~N~E","118~S~o~N~E","122~S~o~N~E"/)  
  res@tmXTMinorOn       = True
  res@tmXTMinorValues   = (/100,104,108,112,116,120/)

  res@tmYLLabelsOn      = True
  res@tmYLMode          = "Explicit"
  res@tmYLValues        = (/20,25,30,35/) ;/30,35/)
  res@tmYLLabels        = (/"20~S~o~N~N","25~S~o~N~N","30~S~o~N~N","35~S~o~N~N"/)   ;(/"30N","35N"/)
  res@tmYLMinorOn       = True
  res@tmYLMinorValues   = (/22.5,27.5,32.5/)

  res@tmXBOn      = False
  res@tmYROn      = False
  res@tmXBLabelsOn      = False
  res@tmYRLabelsOn      = False

  res@tmBorderThicknessF  = thicknessF*1.5

  res@tmXTLabelFontHeightF = sizeF                 ; resize tick labels
  res@tmXTLabelFontThicknessF = 1;thicknessF                ; resize tick labels
  res@tmYLLabelFontHeightF = sizeF
  res@tmYLLabelFontThicknessF = 1;thicknessF                ; resize tick labels

  res@tmXTMajorThicknessF = thicknessF*1.4
  res@tmXTMinorThicknessF = thicknessF*1.4
  res@tmYLMajorThicknessF = thicknessF*1.4
  res@tmYLMinorThicknessF = thicknessF*1.4

  res@tmXTMajorLengthF = 0.006;0.0092
  res@tmXTMajorOutwardLengthF = 0;-0.01
  res@tmXTMinorLengthF = 0.006;0.0092
  res@tmXTMinorOutwardLengthF = 0;-0.006

  res@tmYLMajorLengthF = 0.006;0.0045
  res@tmYLMajorOutwardLengthF = 0;-0.01
  res@tmYLMinorLengthF = 0.006;0.0045
  res@tmYLMinorOutwardLengthF = 0;-0.006

;----------------
  res@mpDataBaseVersion       = "MediumRes"
  res@mpDataSetName         = "Earth..4"

  res@mpMinLatF     = latmin  ;29.0
  res@mpMaxLatF     = latmax  ;34.0
  res@mpMinLonF     = lonmin ;117.0
  res@mpMaxLonF     = lonmax ;123.0

;---- specify mp boundary 边界粗细
  res@mpFillOn                   = True
  res@mpOutlineOn                = True   
  res@mpOutlineDrawOrder         = "PostDraw"
  res@mpOutlineSpecifiers        = (/"Taiwan","China:Provinces"/)
  res@mpNationalLineColor        = "black"
  res@mpProvincialLineColor      = "grey40"
  res@mpGeophysicalLineColor     = "black"
  ;res@mpUSStateLineColor        = "black"
  res@mpNationalLineThicknessF   = thicknessF-0.5
  res@mpProvincialLineThicknessF = thicknessF-0.3
  res@mpGeophysicalLineThicknessF= thicknessF-0.5
  res@mpDataBaseVersion       = "MediumRes"
  res@mpDataSetName           = "Earth..4"
  res@mpAreaMaskingOn         = True
  res@mpMaskAreaSpecifiers   = (/"China:states"/)
  res@mpLandFillColor         = "white"
  res@mpInlandWaterFillColor  = "lightskyblue"
  res@mpOceanFillColor        = "lightskyblue"
  res@mpFillDrawOrder = "PostDraw"

  base = gsn_csm_map(wks, res)  

draw(base)
frame(wks)
end



密码修改失败请联系微信:mofangbao
 楼主| 发表于 2020-9-28 18:02:37 | 显示全部楼层
已解决。当上下坐标轴属性设置不一样的时候,要记得加上res@tmXUseBottom  = False,要不然默认上方坐标轴部分属性和下方的一致
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表