Skip to content

Colorbrewer replacement with palettable#184

Merged
EricR86 merged 2 commits intodevelopfrom
colorbrewer-replacement
Apr 16, 2026
Merged

Colorbrewer replacement with palettable#184
EricR86 merged 2 commits intodevelopfrom
colorbrewer-replacement

Conversation

@EricR86
Copy link
Copy Markdown
Member

@EricR86 EricR86 commented Jan 29, 2026

Notably there is some duplication on the new lines

NUM_COLORS = 8
SCHEME = colorbrewer.qualitative.Dark2_8.colors

However there seems to be some automagic on import making using importlib.import_module not work when trying to import directly.
For example the following does not work:

import_module("palettable.colorbrewer.qualitative.Dark2_8")

The following does work:

import_module("palettable.colorbrewer.qualitative")

Trying to format an import string to match the NUM_COLORS constant seems tricky to work around and might add even more fragility than a duplicated number.

@EricR86
Copy link
Copy Markdown
Member Author

EricR86 commented Jan 29, 2026

@michaelmhoffman ready for your review

@EricR86 EricR86 merged commit 34ef72d into develop Apr 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants