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
When ConfusionMatrixDisplay is deciding on text colors, it uses colormap entry 256 as the text color for labeling cells below the mean value. This is line 125 of metrics/_plot/confusion_matrix.py: cmap_min, cmap_max = self.im_.cmap(0), self.im_.cmap(256)
This causes incorrect coloring and hard-to-read graphs if using a ListedColormap with more than 256 entries. (Which was necessary for my application because I needed to renormalize the colormap)
Describe the bug
When ConfusionMatrixDisplay is deciding on text colors, it uses colormap entry 256 as the text color for labeling cells below the mean value. This is line 125 of metrics/_plot/confusion_matrix.py:
cmap_min, cmap_max = self.im_.cmap(0), self.im_.cmap(256)
This causes incorrect coloring and hard-to-read graphs if using a ListedColormap with more than 256 entries. (Which was necessary for my application because I needed to renormalize the colormap)
Steps/Code to Reproduce
Versions
The text was updated successfully, but these errors were encountered: