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
Using the benchmark plotting functions with the currently recommended package configuration gives the following warning about a Matplotlib function that will be deprecated in a future version:
The set_clim function was deprecated in Matplotlib 3.1 and will be removed in 3.3. Use ScalarMappable.set_clim instead. [benchmark.py:1714]
This is not a problem right now but could become a problem in the future when Matplotlib is updated. We should switch to the recommended function before Matplotlib releases 3.3.
The text was updated successfully, but these errors were encountered:
This commit addresses GCPy issue #24:
#24
which says that the set_clim function will be deprecated in a future
version of matplotlib.
The matplotlib documentation about API changes
https://matplotlib.org/3.1.0/api/api_changes.html
says this:
"matplotlib.colorbar.ColorbarBase is no longer a subclass of
cm.ScalarMappable. This inheritance lead to a confusing situation
where the cm.ScalarMappable passed to matplotlib.colorbar.Colorbar
(colorbar) had a set_norm method, as did the colorbar. The
colorbar is now purely a follower to the ScalarMappable norm
and colormap, and the old inherited methods set_norm,
set_cmap, set_clim are deprecated, as are the getter versions
of those calls. To set the norm associated with a colorbar
do colorbar.mappable.set_norm() etc."
Therefore, we now use cb.mappable.set_norm(norm) to manually pass
the norm object (which renders the data range into the range of
0..1 for plotting) to the colorbar. This produces the same effect
as before.
Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Using the benchmark plotting functions with the currently recommended package configuration gives the following warning about a Matplotlib function that will be deprecated in a future version:
The set_clim function was deprecated in Matplotlib 3.1 and will be removed in 3.3. Use ScalarMappable.set_clim instead. [benchmark.py:1714]
This is not a problem right now but could become a problem in the future when Matplotlib is updated. We should switch to the recommended function before Matplotlib releases 3.3.
The text was updated successfully, but these errors were encountered: