Open
Description
Description
The TwoSlopeNorm doesn't work with proplot.
Steps to reproduce
import numpy as np
import proplot as pplt
from matplotlib.colors import TwoSlopeNorm
import xarray as xr
x, y = np.meshgrid(np.linspace(0,50,51), np.linspace(0,50,51))
z = np.linspace(-2,4,50*50).reshape(50,50)
newnorm = TwoSlopeNorm(vmin=-1, vcenter=0, vmax=3)
fig, axs = pplt.subplots()
xr.DataArray(z).plot(ax=axs, vmin=-1, vmax=3, norm=newnorm, cmap="RdBu_r", discrete=False)
Expected behavior:
Actual behavior:
Equivalent steps in matplotlib
# your code here, if applicable
import matplotlib.pyplot as plt
pc = plt.pcolormesh(x,y,z, norm=newnorm, cmap="RdBu_r")
plt.colorbar(pc)
Proplot version
Paste the results of import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)
here.
3.5.2
0.9.5.post332