爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5715|回复: 2

ncl中坐标轴刻度不均匀,怎么修改成均匀的

[复制链接]

新浪微博达人勋

发表于 2017-7-21 21:34:32 | 显示全部楼层 |阅读模式

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

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

x
纵坐标高度数据不等间距
但是我想要画图时纵坐标是等间距的
应该怎么做

原始数据0-1km高度分辨率是100m 1km到10km分辨率变成了250m
画图脚本如下:
begin
y = asciiread("./altitude.txt",47,"float")
x5 = asciiread("./20080429.txt",(/5744,48/),"float")
data=x5(2::4,1:)
data!0="time"
data!1="altitude"
;data&time=tointeger(x5(2::4,0))/100*1.0
;print(tointeger(x5(2::4,0))/100*1.0)
data&altitude=y
datb=data(altitude|:,time|:)
wks = gsn_open_wks ("pdf","tu")
res  = True  
;res@trXMinF = 0.0         
;res@trXMaxF = 1.
;res@trYMaxF        = 5.0
;res@trYMinF    = 0.0            
res@cnFillOn             = True             ; turn on color for contours
res@cnLinesOn            = False            
res@cnLineLabelsOn       = False   
res@cnFillMode           = "RasterFill"         ; Raster Mode  
;res@cnLevelSelectionMode = "ManualLevels" ; Set manual contour levels
;res@cnMinLevelValF       = 0
;res@cnMaxLevelValF       = 100
;res@cnLevelSpacingF      = 0.1
res@cnInfoLabelOn        = False
res@sfYArray=y
res@tiYAxisString  = "Altitude (km)"
res@tiXAxisString  = "Time"  
;res@tiYAxisFontHeightF= 0.015      
;res@tiXAxisFontHeightF= 0.015
res@tmXTOn               = False  
res@tmYROn               = False  
res@tmXBMajorOutwardLengthF=-0.0
res@tmYLMajorOutwardLengthF=-0.0
res@tmXBMinorOutwardLengthF=-0.0
res@tmYLMinorOutwardLengthF=-0.0
res@tmXBMode              = "Explicit"
res@tmXBValues            = (/0,177,357,537,717,897,1077,1257,1435/)
res@tmXBLabels            = (/"00:03","03:00","06:00","09:00","12:00","15:00","18:00","21:00","23:58"/)
res@tmXBLabelAngleF=45
plot   = gsn_csm_contour(wks, datb, res)
                             
end



ncl中坐标轴刻度不均匀,怎么修改成均匀的

ncl中坐标轴刻度不均匀,怎么修改成均匀的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-9-11 19:44:59 | 显示全部楼层
packard 发表于 2017-7-25 10:33
试试
  res@gsnYAxisIrregular2Linear = True

成功了  万分感谢!
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2017-7-25 10:33:20 | 显示全部楼层
试试
  res@gsnYAxisIrregular2Linear = True
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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