Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add splines figure and script #6656

Merged
merged 10 commits into from
May 6, 2022
Prev Previous commit
Next Next commit
Update GMT_splines.sh
Updated script following Paul's suggestions.
  • Loading branch information
Esteban82 committed May 2, 2022
commit cef2c7795346d826a6f490f35db1922a00cef0d0
18 changes: 9 additions & 9 deletions doc/scripts/GMT_splines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ cat << EOF > t.txt
EOF
# Splines
gmt begin doc_splines png
gmt basemap -R-0.1/6.1/-0.1/3.1 -JX15c/6c -Baf+l"u" -By+l"u(x)" -BWSne
gmt sample1d t.txt -T0.01 -Fc | gmt plot -W1p -l"Cubic spline (-Fc)"
gmt sample1d t.txt -T0.01 -Fs1 | gmt plot -W1p,orange -l"Smooth cubic spline (-Fs1)"
gmt sample1d t.txt -T0.01 -Fl | gmt plot -W1p,blue -l"Linear spline (-Fl)"
gmt sample1d t.txt -T0.01 -Fa | gmt plot -W1p,red -l"Akima spline (-Fa)"
gmt sample1d t.txt -T0.01 -Fn | gmt plot -W1p,darkgreen -l"Nearest neighbor (-Fn)"
gmt plot t.txt -Sc0.25c -Gred -Wthin -l"Data"
gmt legend -DjTL+w4.9c+o0.2c -F+p1p+gwhite+s
gmt end
gmt basemap -R-0.1/6.1/-0.1/3.1 -JX15c/6c -Baf+l"u" -By+l"u(x)" -BWSne
gmt sample1d t.txt -T0.01 -Fc | gmt plot -W1p -l"Cubic spline (-Fc)"
gmt sample1d t.txt -T0.01 -Fs1 | gmt plot -W1p,orange -l"Smooth cubic spline (-Fs1)"
gmt sample1d t.txt -T0.01 -Fl | gmt plot -W1p,blue -l"Linear spline (-Fl)"
gmt sample1d t.txt -T0.01 -Fa | gmt plot -W1p,red -l"Akima spline (-Fa)"
gmt sample1d t.txt -T0.01 -Fn | gmt plot -W1p,darkgreen -l"Nearest neighbor (-Fn)"
PaulWessel marked this conversation as resolved.
Show resolved Hide resolved
gmt plot t.txt -Sc0.25c -Gred -Wthin -l"Data"
gmt legend -DjTL+w4.9c+o0.2c -F+p1p+gwhite+s
gmt end show