Hi I am using GMT 6.0 version in my windows system. I tried to plot Median Stacked profile in bathymetry area as can be seen in the figure but I am trying to plot stations depth as well on stacked line but no success. Can anyone suggest how can I approach this? I tried to use gmt project as well but somewhere I am making mistake. Can anyone please help me? I am ready to share data files.
This below is the script I am using but no success so far! The same example is given on gmt website as example 33.
set int=C:\programs\gmt6\GMT_Course\gridfiles\GEBCO_2019.nc
::set grd=C:\programs\gmt6\GMT_Course\gridfiles\etopo2.nc
::set range=127.3/131.3/27/30.4
set range=126/132/26/31
gmt begin SFM_Profiles jpg A+m0.5c -E600
::gmt makecpt -Cwiki-2.0.cpt -T-6000/4000 -Z
gmt grdcut @earth_relief_15s -G%int% -R%range% -V
gmt grdimage %int% -R%range% -JM18c -I+a300 -Cglobe -V
gmt coast -Df -Bxa1f0.5 -Bya1f0.5 -BWSEN+t"Bathymetry Depth" -W0.8p --FONT_TITLE=35,31,black -V
::gmt basemap -Lx1c/19c+w50k+l+f+jBL --FONT_TITLE=30,25,navy -V
gmt colorbar -C%cpt% -Bxa2000f1000+l"elevation" -By+l"m" -Dx8c/-1.8c/9c/0.5ch -I0.8 -V
:: Select two points along the ridge
echo 128 27 > ridge.txt
echo 130.5 30 >> ridge.txt
gmt plot -Sc0.1i -Gblue ridge.txt
gmt plot ridge.txt -W1p,blue
gmt grdtrack ridge.txt -G%int% -C360k/2k/10k+v -Sm+sstack.txt > table.txt
gmt plot -W0.5p table.txt
gmt plot OT_Stations.txt -i1,0 -Sa17p -W0.5p -Gyellow
gawk "BEGIN {FS=\",\"} {print $2, $1, $3}" OT_loc.csv | gmt text -F+f17p,Times-Roman,red,thick+jBL -Dj0.4p -N
gmt convert stack.txt -o0,5 > env.txt
gmt convert stack.txt -o0,6 -I -T >> env.txt
::gmt plot env.txt -R-400/400/-3250/250 -JX6i/2i -W1p,red -Bxa100f10+ukm -Bya1500f250+lElevation+um -BWnSe+tProfiles -X8i -Y3i -V
gmt plot -R-230/230/-8500/1000 -Bxafg1000+l"Distance from middle section (km)" -Byaf+l"Elevation (m)" -BWSne+t"MEDIAN STACKED PROFILE" -JX9i/4i -Glightgray env.txt -X8.5i -Y2i
::gmt plot env.txt -R-200/200/-3500/-2000 -JX6i/3i -W1p,gold -V
gmt plot -W3p stack.txt
::gmt project OT_Stations_depth.txt -Cenv.txt -E$(awk '{print $1, $2}' ridge.txt) -Fpz -V | gmt plot -Sa0.15i -Gblack -W0.5p
::gmt project OT_Stations_depth.txt -Cenv.txt -Q -Fpz -V | gmt plot -Sa0.15i -Gblack -W0.5p
::gmt plot OT_Stations_depth.txt -i1,0 -Sa0.15i -Gblack -W0.5p
::gmt project stack.txt -C128/27 -Fpz | gmt plot -W3p,black
::gmt project OT_Stations_depth.txt -C128/27 -Fpz | gmt plot -Sa0.15i -Gblack -W0.5p
::gmt plot OT_Stations_depth.txt -i1,0,3 -Sa0.15i -Gblack -W0.5p
::gmt legend -DjBL+w2i/2.3i+l2+o0.25c/20c -C0.15i/0.1i -F+p+g255/228/225+p+r
gmt end show
del *.info *.conf *.int *.history *.grd
pause