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

Some colormaps aren't reversed #4

Open
endolith opened this issue Aug 9, 2024 · 1 comment
Open

Some colormaps aren't reversed #4

endolith opened this issue Aug 9, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@endolith
Copy link
Contributor

endolith commented Aug 9, 2024

I'm confused as to why amber and amber_r both exist, for instance, but deep_r does not exist. I also don't see a function to reverse a colormap or anything like that? I guess I can use map.get_mpl_color_map().reversed().

@ThomasBury ThomasBury self-assigned this Aug 9, 2024
@ThomasBury ThomasBury added the question Further information is requested label Aug 9, 2024
@ThomasBury
Copy link
Owner

Hello @endolith,
thank you for reaching out.

I primarily rely on established colormap providers and do not create my own, including reversed colormaps. While some colormaps benefit from reversal, others may not. Reversed sequential colormaps often work well with dark backgrounds.

You can indeed use the reversed() method in Matplotlib to reverse existing (list) colormaps.

If you'd like me to incorporate additional colormaps from reputable sources, please feel free to suggest them. I'll evaluate whether they warrant inclusion or if adding a dependency is necessary.

However, the standardization functions should work fine with your own, you can pass a mpl cmap as in the example:

import scicomap as sc
import matplotlib.pyplot as plt

# works for other cmap type
mpl_cmap = plt.get_cmap(A_MPL_SEQUENTIQL_CMAP)
sc_map =  sc.ScicoSequential(cmap=mpl_cmap)
f=sc_map.assess_cmap(figsize=(22,10))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants