GenericMappingTools / GenericMappingTools/gmt
Different alignment options for map titles (-B+t+s)
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
_See [this forum thread](https://forum.generic-mapping-tools.org/t/different-alignment-options-for-b-t/3468) for context._
Currently the plot titles are always centered. Other alignments like top right as seen in the following mockup are desirable.

Currently this has to be done with manually placed text. This is difficult when the plot width is not known (e.g. when using a map scale) or the absolute position of the map border on the plot is unknown (e.g. when using annotations outside the map borders). @PaulWessel suggested a new default setting `MAP_TITLE_JUST` which would allow for maximum flexibility as imagined below:

A `--MAP_TITLE_JUST=TR` would align the title to the upper-right position as seen in the first figure above.
Minimum code for a simple plot to play with:
```bash
gmt begin title_alignment
gmt coast -RUS.HI+e1 -W0.7p,black -B+f -Bg --MAP_FRAME_TYPE=plain \
-B+t"HAWAIIAN ISLANDS"+s"Pacific Ocean"
gmt end show
```
Contributor guide
Assessment
This issue has not been assessed yet.