Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

trend_xy_plot.sh 761 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  1. #!/usr/bin/env bash
  2. # Create cubic data in x and y separately, then fit with -N4 +x|y
  3. gmt begin trend_xy_plot ps
  4. # Fit in x only
  5. gmt grdmath -R-1.2/1.2/-0.2/0.2 -I0.4 -r 0.5 X ADD X X MUL ADD X 3 POW ADD = data.grd
  6. gmt grdtrend data.grd -N4+x -Ttrend.grd -V
  7. gmt grd2xyz -o0,2 data.grd | gmt plot -JX10c -B+t"data and model -N4 for x" -R-1/1/-1/2 -Sc0.1c -Gred -B
  8. gmt grd2xyz -o0,2 trend.grd | gmt plot -W0.5p
  9. # Fit in x only
  10. gmt grdmath -R-0.2/0.2/-1.2/1.2 -I0.4 -r 0.5 Y ADD Y Y MUL ADD Y 3 POW ADD = data.grd
  11. gmt grdtrend data.grd -N4+y -Ttrend.grd -V
  12. gmt grd2xyz -o1,2 data.grd | gmt plot -B+t"data and model -N4 for y" -R-1/1/-1/2 -Sc0.1c -Gred -B -Y12c
  13. gmt grd2xyz -o1,2 trend.grd | gmt plot -W0.5p
  14. gmt end show
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...