您的位置:首页 > 其它

【NCL】添加中文字符

2016-01-17 09:11 393 查看
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

load "$NCARG_ROOT/supplies/chinese/WCHAR.ncl"

begin

        wks = gsn_open_wks("x11","name")

        drawNDCGrid(wks)

        res = True

        res@gsnFrame = False

        plot = gsn_blank_plot(wks, res)

;

        ftres = True

        ftres@fontQuality = "High"

        ftres@fontSize = 16

        ftres@fontColor = "blue"

        ftres@fontName = "S"

        ftres@fontEncoding = "utf8";GBK有问题

;       ftres@fontXoffsetF = .2

;       ftres@fontYoffsetF = .22

        ftres@fontJust = "BottomLeft"

        ftres@fontAngleF = 0.

        ftres@fontNDC = True

        fontX(wks, plot, "NCL可以标注中文了!", 0.5, 0.4, ftres)

;

        frame(wks)                              

end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: