Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MNT: Refactor from_levels_and_colors()
Primary motivation was to remove the N parameter to ListedColormap (in preparation of its deprecation matplotlib#28763 (comment) -2322791660). That parameter is not needed here because `len(colors[color_slice]) == n_data_colors)`, otherwise the ValueError above would have raised. Hopefully, this is overall more readable.
- Loading branch information