Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to Matplotlib.colors.DivergingNorm

1 - What is the alternative to Matplotlib.colors.DivergingNorm that has been deprecated since Matplotlib 2.3.1?

2 - I still get AttributeError: module 'matplotlib.colors' has no attribute 'DivergingNorm', even though I am using Matplotlib version 2.2.4. Why?

Thank you!

like image 417
aerijman Avatar asked Aug 07 '26 06:08

aerijman


1 Answers

This doesn't answer the question for 2.2.4, but for the benefit of anyone who comes across this looking for the current (3.2.0) alternative: it is now matplotlib.colors.TwoSlopeNorm, the usage and documentation are identical to the matplotlib.colors.DivergingNorm from 3.1.0.

like image 52
William Miller Avatar answered Aug 08 '26 21:08

William Miller