# Modern mode and default -J

**URL:** <https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548>\
**Category:** Q&A\
**Created:** [June 15, 2020, 5:49pm UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548 "2020-06-15T17:49:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [June 15, 2020, 5:49pm UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/1 "2020-06-15T17:49:56Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![seisman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/seisman/32/4_2.png) [@seisman](https://forum.generic-mapping-tools.org/u/seisman)\
**Post date:** [June 15, 2020, 7:55pm UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/2 "2020-06-15T19:55:08Z")

</div>

Add `-Vd` to your command and you’ll see

```auto
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

```auto
~~any words here~~

```

~~any words here~~

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [June 15, 2020, 10:08pm UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/3 "2020-06-15T22:08:34Z")

</div>

Great seisman, thanks.

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [June 16, 2020, 1:33am UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/4 "2020-06-16T01:33:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![seisman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/seisman/32/4_2.png) [@seisman](https://forum.generic-mapping-tools.org/u/seisman)\
**Post date:** [June 16, 2020, 6:25pm UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/5 "2020-06-16T18:25:23Z")

</div>

> 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:

> **[Basic writing and formatting syntax - GitHub Docs](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)**
>
> Create sophisticated formatting for your prose and code on GitHub with simple syntax.

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [June 19, 2020, 12:16am UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/6 "2020-06-19T00:16:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [June 19, 2020, 11:08am UTC](https://forum.generic-mapping-tools.org/t/modern-mode-and-default-j/548/7 "2020-06-19T11:08:43Z")

</div>

Thats strange.

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

```

works fine and produces a map.
