Howdy,
I am trying to get my head around the modern mode so i can use some of the new functionality, particularly ‘movie’. I am running GMT6 on windows through cygwin.
My problem arises when trying to plot two commands to the same figure. When I run a script that starts with gmt begin
it never works.
For example, using a script from the cook book:
gmt begin map
gmt basemap -R0/6.5/0/7 -Jx2c -B
gmt plot @Table_5_11.txt -Sc0.3c -Gred
gmt end show
gives the errors:
gmt.exe [ERROR]: Shared GMT module not found: basemap
and
gmt.exe [ERROR]: Shared GMT module not found: plot
gmt.exe [ERROR]: Not available in classic mode
(i tried running it by pasting each line individually in the command window and by launching the script using ./plot_map_modern.sh
)
but if i run each line separately like this:
gmt basemap -R0/6.5/0/7 -Jx2c -B -png map
and
gmt plot @Table_5_11.txt -Sc0.3c -Gred -png map
(adding the bit to write to files on each line) i get plots with the correct filename, but separately (the second command of course overwrites the file created in the first). I did this only to check if the modern mode was indeed working…
The modern mode only seems to work for plotting if I have the command only on one line. I also tried the’one line syntax’ examples in the manual and they work too.
So the question is: How do I get that first gmt begin
command to work properly? What am I doing wrong? is it a cygwin thing?
Thanks,
-jose
p.s. the real script i am trying to run looks like this:
datafile=../data.nc
region=-R172/186/-40/-25
echo $region
project=-JM180/0/6i
border=-Bf1a5nSWe
gmt begin plot1 png -Vl
gmt makecpt -Cjet -D -M -T-1000/1000/1 > tmp.cpt
gmt grdimage $datafile?max_height $region $project $border -Ctmp.cpt -Q
gmt coast $region $project $border -W -Df -Ggrey -N1/1p,white
gmt end
and it gives me the same behaviour as above, i,e, i get plots if i d each line individually, but i can’t get one to plot on top of the other in the same file.