Skip to content

Instantly share code, notes, and snippets.

@jakevdp
Last active June 8, 2025 22:34
Show Gist options
  • Save jakevdp/8a992f606899ac24b711 to your computer and use it in GitHub Desktop.
Save jakevdp/8a992f606899ac24b711 to your computer and use it in GitHub Desktop.
Example of a categorical color map in matplotlib
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danielreispereira
Copy link

Never understood why mpl does not have the ability of mapping categorical variables to colors automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment