Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/api/api_changes/qualitative colormaps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Qualitative colormaps
---------------------

Colorbrewer's qualitative/discrete colormaps ("Accent", "Dark2", "Paired",
"Pastel1", "Pastel2", "Set1", "Set2", "Set3") are now implemented as
``ListedColormap`` instead of ``LinearSegmentedColormap``.

To use these for images where categories are specified as integers, for
instance, use::

plt.imshow(x, cmap='Dark2', norm=colors.NoNorm())
9 changes: 9 additions & 0 deletions doc/users/whats_new/qualitative colormaps.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Qualitative colormaps
---------------------

ColorBrewer's "qualitative" colormaps ("Accent", "Dark2", "Paired",
"Pastel1", "Pastel2", "Set1", "Set2", "Set3") were intended for discrete
categorical data, with no implication of value, and therefore have been
converted to ``ListedColormap`` instead of ``LinearSegmentedColormap``, so
the colors will no longer be interpolated and they can be used for
choropleths, labeled image features, etc.
Loading