zhoufcumt的个人博客分享 http://blog.sciencenet.cn/u/zhoufcumt

博文

GMT第三弹:时间序列的曲线图

已有 9955 次阅读 2013-5-31 20:25 |个人分类:GMT|系统分类:科研笔记|关键词:学者| GMT, GPS时间序列图

  本例的脚本和数据文件会在下方提供下载,可根据类似格式和熟读脚本写出你想要的时间序列图,当然matlab可以搞定的,但是既然选择了GMT就要尽量多熟练掌握她的应用吧,GMT == give u surprises in any time, as u know。

 NOTE: 如果有更好的建议或者改进请及时通知原作者 zhouforme@gmail.com。

脚本:

#!/bin/bash

#

# Purpose:Plot residuals

# Author :  Feng Zhou

# Date   :  2013-05-31

#

outps=ats_resi.eps

ORI="-P"


# plot North

# plot a line on zero

psxy <<! -R2001.5/2007.5/-10/10 -JX16.0/7.0 -X2.0 -Y16.7 -K $ORI -W1/200/200/200 -V \

-Ba1.0f0.5/a2.0f1.0sWne > $outps

2001.50 0.00

2007.50 0.00

!


# plot ats residual : red line

cat $1 | grep -v "\*" | awk '{print $1, $3, 0.1}' | \

psxy -R -J -K -O $ORI -W2/255/0/0 -V >> $outps


# put text

pstext <<! -H0 -JX -R -O -K -V $ORI >> $outps

2001.75  -8 13 0 1 1 N(mm)

!


# plot East

# plot a line on zero

psxy <<! -R2001.5/2007.5/-10/10 -JX16.0/7.0 -X0.0 -Y-7.0 -O -K $ORI -W1/200/200/200 -V \

-Ba1.0f0.5/a2.0f1.0sWne >> $outps

2001.50 0.00

2007.50 0.00

!


# plot ats residual : red line

cat $1 | grep -v "\*" | awk '{print $1, $2, 0.1}' | \

psxy -R -J -K -O $ORI -W2/0/255/0 -V >> $outps


# put text

pstext <<! -H0 -JX -R -O -K -V $ORI >> $outps

2001.75  -8 13 0 1 1 E(mm)

!


# plot Up

# plot a line on zero

psxy <<! -R2001.5/2007.5/-30/30 -JX16.0/7.0 -X0.0 -Y-7.0 -K -O $ORI -W1/200/200/200 -V \

-Ba1.0f0.5/a5.0f2.5SWne >> $outps

2001.50 0.00

2007.50 0.00

!


# plot ats residual : red line

cat $1 | grep -v "\*" | awk '{print $1, $7, 0.1}' | \

psxy -R -J -K -O $ORI -W2/0/0/255 -V >> $outps


# put text

pstext <<! -H0 -JX -R -O -V $ORI >> $outps

2001.75  -25 13 0 1 1 U(mm)

!


# Convert EPS to PNG

ps2raster $outps -A -P -Tg


# Clean up after ourselves:

rm -f .gmt*


效果图:



脚本和数据文件附件:

ats_resi.gmt

albh_resi.neu





https://m.sciencenet.cn/blog-350278-695384.html

上一篇:英文写作常用副词、连词
下一篇:比VIM更好,比Emacs体验更好的Sublime Text 2

1 方进

该博文允许注册用户评论 请点击登录 评论 (5 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-1 16:50

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部