Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide access to GMT native colormaps #381

Open
MarkWieczorek opened this issue Nov 21, 2019 · 3 comments
Open

Provide access to GMT native colormaps #381

MarkWieczorek opened this issue Nov 21, 2019 · 3 comments
Labels
feature request New feature wanted help wanted Helping hands are appreciated
Milestone

Comments

@MarkWieczorek
Copy link
Contributor

As far as I can tell, it is currently not possible to make use of the native GMT colormaps outside of the pygmt routines. There are lot of reasons of why you might want to use these elsewhere. For example, you might want to plot colored x-y data in a matplotlib image and use the same colormap in an accompanying pygmt map.

Some of these colormaps (such as Fabio Crameri's) can be downloaded and installed separately. Nevertheless, it would be much more convenient if these colormaps were all included explicitly in pygmt (such as in a module cmap, for example).

@leouieda
Copy link
Member

Hi @MarkWieczorek this is a bit tricky right now since we don't really have access to the GMT colormaps in memory. It's not impossible but right now they are handled by GMT as a hidden file. I agree that it would be good to be able to use GMT and maptlotlib colormaps interchangeably. I'm focusing more on the foundations of the library than adding new features still but let's keep this as a requested feature.

@leouieda leouieda added the feature request New feature wanted label Nov 28, 2019
@MarkWieczorek
Copy link
Contributor Author

Perhaps a bigger issue is that it is not possible to pipe a custom matplotlib colormap into pygmt. An easy way to do this would be to provide a function pygmt.cmap_to_cpt(), which could then be used by pygmt.makecpt()

@weiji14 weiji14 added this to the 0.4.0 milestone Nov 22, 2020
@weiji14 weiji14 added the help wanted Helping hands are appreciated label May 1, 2021
@weiji14 weiji14 modified the milestones: 0.4.0, 0.5.0 Jun 1, 2021
@weiji14 weiji14 modified the milestones: 0.5.0, 0.6.0 Sep 30, 2021
@weiji14 weiji14 modified the milestones: 0.6.0, 1.0.0 Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature wanted help wanted Helping hands are appreciated
Projects
None yet
Development

No branches or pull requests

4 participants