- 积分
- 827
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-12-16
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我运行的代码
load "/usr/local/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"
begin
x = new(9,float) ; Define two 1D arrays of 9 elements each.
y = new(9,float)
x = (/10.,20.,30.,40.,50.,60.,70.,80.,90./)
y2 = (/(/0., 0.7, 1., 0.7, 0., -0.7, -1., -0.7, 0./),\
(/2., 2.7, 3., 2.7, 2., 1.3, 1., 1.3, 2./),\
(/4., 4.7, 5., 4.7, 4., 3.3, 3., 3.3, 4./)/)
wks = gsn_open_wks("x11","gsun01n") ; Open an X11 workstation.
resources=Ture
resources@tiMainString = "X-Y plot" ; Title for the XY plot
resources@tiXAxisString = "X Axis" ; Label for the X axis
resources@tiYAxisString = "Y Axis" ; Label for the Y axis
resources@tiMainFont = "Helvetica" ; Font for title
resources@tiXAxisFont = "Helvetica" ; Font for X axis label
resources@tiYAxisFont = "Helvetica" ; Font for Y axis label
resources@xyMarkLineModes = (/"Lines","Markers","MarkLines"/)
resources@xyMarkers = (/0,1,3/) ; (none, dot, asterisk)
resources@xyMarkerColor = 3 ; Marker color
resources@xyMarkerSizeF = 0.03 ; Marker size (default
; is 0.01)
plot = gsn_xy(wks,x,y2,resources) ; Draw an XY plot.
end
运行提示错误
fatal:Variable (resources) is undefined, can not assign attribute (tiMainString)
fatal:Execute: Error occurred at or near line 12 in file 1.ncl
为什么啊,还有ncl出来的图怎么保存下来?
请大神帮忙啊
|
|