- 积分
- 1025
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-4-22
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 LeoBao 于 2012-5-12 20:18 编辑
最近做论文,画完时间序列图之后,觉得看起来不是很明显,想画趋势线,手册中查到用trege(expr1,expr2,tdim1,tdim2)这个函数可以实现,于是把年份1959-2008放到一个grd里面,并编了ctl,作为变量1,然后原来50年平均降水50个值作为变量2并编写gs如下
'reinit'
'open d:\essay\qs\ttt.ctl'
'open d:\essay\qs\tt.ctl'
'set x 1'
'set y 1'
'set z 1'
'set grid on'
'set grads off'
'enable print d:\essay\qs\rain111.gmf'
'set t 1 50'
'd ot.2'
'set t 1'
'd tregr(st,ot.2,t=1,t=50)'
'define coeff=tregr(st,ot.2,t=1,t=50)'
'define stave=ave(st,t=1,t=50)'
'define otave=ave(ot.2,t=1,t=50)'
'd coeff*(st-stave)+otave'
'print'
'c'
'disable'
;
奇怪的是最后只出了折线图,最后几行编的没用,没有趋势图,为什么啊? |
|