You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Qualitative" colormaps represented as continuous #881
Sequential palettes are suited to ordered data that progress from low to high. Lightness steps dominate the look of these schemes, with light colors for low data values to dark colors for high data values.
Diverging palettes put equal emphasis on mid-range critical values and extremes at both ends of the data range. The critical class or break in the middle of the legend is emphasized with light colors and low and high extremes are emphasized with dark colors that have contrasting hues.
Qualitative palettes do not imply magnitude differences between legend classes, and hues are used to create the primary visual differences between classes. Qualitative schemes are best suited to representing nominal or categorical data.
So the "qualitative" maps (Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3) should not be smoothly-varying.
Should I go through them and do that and submit a patch? I'm not sure if the matplotlib colormaps are even meant to be used for categorical data like this.
Sequential palettes are suited to ordered data that progress
from low to high. Lightness steps dominate the look of these
schemes, with light colors for low data values to dark colors for
high data values. 2. Diverging palettes put equal emphasis on
mid-range critical values and extremes at both ends of the data
range. The critical class or break in the middle of the legend is
emphasized with light colors and low and high extremes are
emphasized with dark colors that have contrasting hues. 3.
Qualitative palettes do not imply magnitude differences between
legend classes, and hues are used to create the primary visual
differences between classes. Qualitative schemes are best suited to
representing nominal or categorical data.
Should I go through them and do that and submit a patch? I'm not
sure if the matplotlib colormaps are even meant to be used for
categorical data like this.
As I read it, segmented (qualitative) maps should be generated with a
number of segments matching the (small) number of categories, so it
looks like dumping them in as if they were continuous was a mistake--but
it would equally be a mistake to convert them to segmented.
ListedColormap is more appropriate for working with a few discrete colors.
I think we are stuck with the silly things the way they are.
Eric
--- Reply to this email directly or view it on GitHub: #881
Ok, I wasn't aware of ListedColormap. Is there a way to use these colormaps with it? All the examples I see just use an explicit list, like cmap = mpl.colors.ListedColormap(['r', 'g', 'b', 'c'])
I wonder if the binary colormap belongs in the same group. It's produces an identical gradient to gray_r, but the example included with it only uses the most extreme values of pure white or pure black. I'm not sure why it exists.
Activity
efiring commentedon May 19, 2012
On 05/18/2012 09:38 AM, endolith wrote:
As I read it, segmented (qualitative) maps should be generated with a
number of segments matching the (small) number of categories, so it
looks like dumping them in as if they were continuous was a mistake--but
it would equally be a mistake to convert them to segmented.
ListedColormap is more appropriate for working with a few discrete colors.
I think we are stuck with the silly things the way they are.
Eric
endolith commentedon May 22, 2012
Ok, I wasn't aware of ListedColormap. Is there a way to use these colormaps with it? All the examples I see just use an explicit list, like
cmap = mpl.colors.ListedColormap(['r', 'g', 'b', 'c'])I wonder if the
binarycolormap belongs in the same group. It's produces an identical gradient togray_r, but the example included with it only uses the most extreme values of pure white or pure black. I'm not sure why it exists.efiring commentedon Aug 13, 2012
I think this issue can be closed, based on #921 having been merged.
endolith commentedon Aug 17, 2012
#921 isn't related to this, but the docs change in #889 to discourage their use is. (endolith@cce4441#L0R1789)
efiring commentedon Aug 17, 2012
Thank you for the correction.