Fortran进行t检验后使用GrADS画打点图
生活随笔
收集整理的這篇文章主要介紹了
Fortran进行t检验后使用GrADS画打点图
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
前段時(shí)間寫(xiě)本科論文,使用到了對(duì)于海溫sst差值場(chǎng)的顯著性t檢驗(yàn),但苦于不會(huì)用GrADS畫(huà)打點(diǎn)圖,網(wǎng)上也找不到畫(huà)打點(diǎn)的.gs代碼,5月1放假自己在樓里硬憋出來(lái)一段代碼,供大家參考,實(shí)測(cè)可以運(yùn)行,輸入數(shù)據(jù)為差值場(chǎng)和t檢驗(yàn)結(jié)果,其核心是循環(huán)判斷并且畫(huà)點(diǎn)“draw sting”。
'reinit' 'open D:\lunwen\nczhuangrd\grdfenlei\sst_jianyan\chazhi12.ctl' 'open D:\lunwen\nczhuangrd\grdfenlei\sst_jianyan\t12.ctl''set grid off' 'set grads off' 'set cthick 6' * These are the BLUE shades藍(lán)色 'set rgb 16 0 0 255' 'set rgb 17 55 55 255' 'set rgb 18 110 110 255' 'set rgb 19 165 165 255' 'set rgb 20 220 220 255' * These are the RED shades紅色 'set rgb 21 255 220 220' 'set rgb 22 255 165 165' 'set rgb 23 255 110 110' 'set rgb 24 255 55 55' 'set rgb 25 255 0 0' *陰影'set xlint 10' 'set xlopts 1 4 0.15' 'set ylint 5' 'set ylopts 1 4 0.15''set x 105 255' 'set y 90 145' *'set gxout shaded' *'set ccols 14' *'set clevs -2.654 -1.997 1.997 2.654' *'set ccols 18 20 0 23 25' *'d sst.2''set gxout shaded' 'set clevs -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4' 'set ccols 16 17 18 19 20 21 22 23 24 25' 'd sst.1' 'cbar 1.0 0'y2=90 while (y2<145) x2=105 while(x2<255) 'set x 'x2 'set y 'y2 'd sst.2' aaa=subwrd(result,4) if(aaa=-9.99e+08) aaa=0 endif if(aaa<0) aaa=-aaa endif *if(aaa>2.654) if(aaa>1.997) 'q w2xy 'x2-0.5' ' y2-90.5'' abx=subwrd(result,3) aby=subwrd(result,6) 'set string 1 c 9' 'set strsiz 0.01' 'draw string 'abx' 'aby' `32' endif x2=x2+1 endwhile y2=y2+1 endwhile'draw title difference field and t test type2-type1' 'printim D:\lunwen\nczhuangrd\grdfenlei\sst_jianyan\chazhi_and_t12.png white' *'c' ;圖片如圖,希望有所幫助。
總結(jié)
以上是生活随笔為你收集整理的Fortran进行t检验后使用GrADS画打点图的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Liferay Portal 7.4 G
- 下一篇: Wikipedia iOS客户端源码