Skip to content

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

@MarkWieczorek

Description

@MarkWieczorek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedHelping hands are appreciatedquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions