【NCL】添加中文字符

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

版权声明:本文为qwsamxy原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。