GenericMappingTools / GenericMappingTools/gmt
CPT files with labels should optionally apply to the interval
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
**Description of the desired feature**
This issue derives partly from this [post](https://forum.generic-mapping-tools.org/t/colorbar-and-oblique-annotation/1424/6) on the forum. Per our [documentation](https://docs.generic-mapping-tools.org/dev/cookbook/features.html#regular-cpts), the CPT may have a flag **L**|**U**|**B** to indicate that the optional label should be placed on the lower, upper, or both ends of the color slice. However, if the color slice represents an interval (e.g., a day, year, geologic period) then one would actually want the label to be placed at the center of the slice interval. It would seem the only way to accomplish this is to allow the flag **I** for Interval. Then, tools like **colorbar** can know what to do with custom annotations for unequal intervals. The closest thing we have to doing this is **colorbar -Li**, which does use the label as an interval annotation, but it also turns all color intervals to equal lengths, which is not what we want here. As an example of a slice in such as CPT file:
`66.0 lightgreen 72.1 lightgreen I ; Maastrichtian`
since that is the name of a geologic interval.
An alternative to the flag would be to instead enhance **-L** to take to take a modifier to **not** make the intervals equal size. Thoughts, @GenericMappingTools/core ?
Contributor guide
Assessment
This issue has not been assessed yet.