GenericMappingTools / GenericMappingTools/gmt

Inconsistent behavior for directional rose

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

Description

*Originally reported in https://github.com/GenericMappingTools/pygmt/pull/4025#issuecomment-3673413020.*

The issues are:

- Directional roses are plotted at bottom-left (`x0/0`) by default, but it seems the anchor point is "BL" for a simple rose and "MC" for a fancy rose. So, the behavior is inconsistent.
- The box is not drawn for the simple rose when the position is `x0/0`
- Setting position to jBL looks good, but the box for the simple rose seems to be a square which doesn't fit the simple rose well.

```bash
gmt begin map png
gmt basemap -R100/110/30/35 -JM10c -Baf
gmt basemap -Td+w2c -F+pblue
gmt basemap -Td+w2c+f -F+pred

gmt basemap -R100/110/30/35 -JM10c -Baf -Xw+2c
gmt basemap -Tdx0/0+w2c -F+pblue
gmt basemap -Tdx0/0+w2c+f -F+pred

gmt basemap -R100/110/30/35 -JM10c -Baf -Xw+2c
gmt basemap -TdjBL+w2c -F+pblue
gmt basemap -TdjBL+w2c+f -F+pred
gmt end show
```

Image

Another issue is the default width. The GMT docs say the default width is 10%, but the following script crashes
```
gmt begin map png
gmt basemap -R100/110/30/35 -JM10c -Baf
gmt basemap -Tdx0/0 -F+pblue
gmt basemap -Tdx0/0+f -F+pred
gmt end show
```
The error message is:
```
basemap [ERROR]: Option -T: Correct syntax
basemap [ERROR]: -T[f|m][x]//[/][:wesnlabels:][+[/]]
basemap [ERROR]: Could not decode dx0, return NaN.
basemap [ERROR]: Option -T: Could not parse geographic coordinates dx0 and/or 0
basemap [WARNING]: not a valid number and may not be decoded properly.
basemap [ERROR]: Option -T: Size must be positive
basemap [ERROR]: Option -T: must be 1, 2, or 3
```
The default width works well if position is not `x0/0`. I think it's because when `x0/0` is used, GMT fallback to the old GMT syntax, which doesn't have default width set.

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.