Modern mode and default -J

When I do;

$ gmt pscoast -Bafg -W -RNO -pdf testmap

I assume GMT implicitly goes modern mode since -pdf is given (edit: confirmed after testing). This makes it not necessary for me to specify a projection (-J). So, what -J is chosen for me?

Edit: I thought that I should be able to probe this myself by looking in the ~/.gmt/session/gmt6.[ppid], but it’s just to fast gone (if it even exists…?)! Is it any way I can see the equivalent of gmt.history (and gmt.conf) for a modern mode plot?

Discard rest of post below. Keeping for possibly future use.

PS! Any way to use strikethrough in this forum?


Dir now looks like this:

$ ls
testmap.pdf

Run the command again, but remove -pdf testmap, and GMT goes classic;

$ gmt pscoast -Bafg -W -RNO
pscoast [ERROR]: Must specify a map projection with the -J option

Since now in classic mode gmt.history is created. The dir now looks like this:

$ ls
gmt.history  testmap.pdf

Add -Vd to your command and you’ll see

gmt [DEBUG]: Modern: Adding -JQ15c+ to options since there is no history available.

BTW, the forum uses markdown syntax. So you can have strikethrough by

~~any words here~~

any words here

Great seisman, thanks.

Alright, and now part deux.

#Modern mode - auto -J, plots fine
$ gmt pscoast -Bafg -W -ENO -pdf testmap

# Invoke classic mode - gmt.history written
$ gmt pscoast -Bafg -W -ENO 
pscoast [NOTICE]: Computed primary annotation font size: 6.66667 p  Dimension scaling: 0.666667
pscoast [ERROR]: Must specify a map projection with the -J option

$ ls
gmt.history  testmap.pdf

#Repeat first command
$ gmt pscoast -Bafg -W -ENO -pdf testmap
begin [NOTICE]: Computed primary annotation font size: 6.66667 p  Dimension scaling: 0.666667
coast [NOTICE]: Computed primary annotation font size: 6.66667 p  Dimension scaling: 0.666667
coast [ERROR]: Must specify -R option
end [NOTICE]: Computed primary annotation font size: 6.66667 p  Dimension scaling: 0.666667

When I do the first (modern mode) command again, now with a gmt.history present in the directory, I get the Must specify -R option-error as shown in the last command.

PS! Any way to use tags to do preformatted text instead of padding all code lines with four spaces?

PS! Any way to use tags to do preformatted text instead of padding all code lines with four spaces?

You can use triple backticks. See the link for examples:

Are you sure?

gmt coast -Bafg -W -ENO -pdf testmap

coast [ERROR]: Must specify -R option

There is no -R, only a selection of NO via -E.

Thats strange.

$ gmt coast -Bafg -W -ENO -pdf testmap

works fine and produces a map.