GenericMappingTools / GenericMappingTools/pygmt

Allow for "makecpt" style colormap functionality in grdimage and colobar

Open
#372 12 comments 0 reactions 0 assignees View on GitHub
help wanted question
Dominant language
Python
Stars
874
Forks
255
Avg merge
1d 21h
Merged PRs (30d)
40

Description

In classic gmt the function `makecpt` is used to create a "cpt" file that acts as a color map for plotting data in `grdimage` and in plotting a colorbar.

In its present state, pygmt does not (to the best of my knowledge) allow for creating a custom colormap for use in both `grdimage` and `colorbar`, which greatly limits the utility of pygmt. Such functionality could be achieved in the following way:

```
fig.makecpt(limits=[min, max], cmap=..., transparency=False, cpt='name of temporary output cpt file')
fig.grdimage(cpt='name of temporary cpt file')
fig.colorbar(cpt='name of temporary cpt file')
```

In practice, a single image could have several cpt files associated with it.

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.