GenericMappingTools / GenericMappingTools/gmt

Should check if a fixed dimension is given in subplot mode

Open
#4,977 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

**Full script that generated the error**

```
gmt begin subplot1
gmt subplot begin 1x2 -A -Fs5c/5c -BWSen
gmt basemap -R0/10/0/10 -JX? -c0
echo 5 5 | gmt plot -Sc0.5c -Gred

gmt basemap -R0/10/0/10 -JX8c/5c -c1
echo 5 5 | gmt plot -Sc0.5c -Gred
gmt subplot end
gmt end show
```

![image](https://user-images.githubusercontent.com/3974108/111417041-6ff0f200-86bb-11eb-82bf-208321a7bb47.png)

In panel (b), the circle is plotted at the wrong position, because I specify a fixed dimension (`-JX8c/5c`) in subplot mode. We had some discussions #1427, but I'm a little confused whether we want to allow fixed dimensions in subplot mode.

If we decide to allow fixed dimensions, then it's a bug. Otherwise, we should check if fixed dimensions are given.

The subplot manpage says:

> If any -J option is passed without the scale or width when you first are plotting inside the subplot, then the scale of the map is automatically determined by the subplot size and your region. For Cartesian plots: If you want the scale to apply equally to both dimensions then you must specify -Jx [The default projection of -JX will fill the subplot by using unequal scales].

It reads like fixed dimensions are allowed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.