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
vmin and vmax are ignored if you pass a norm instance.
However, it seems that this is not the case. Is the documentation correct of the behaviour?
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlibcmap=matplotlib.cm.viridis_rnorm=matplotlib.colors.BoundaryNorm([1,3,6,8], cmap.N, clip=True)
values=np.arange(10)
# only specifying a normplt.scatter(values, values, c=values, norm=norm)
# also specifying vmin/vmax. Should those be ignored?plt.scatter(values, values, c=values, norm=norm, vmin=6, vmax=10)
Actual outcome
# only specifying a norm
plt.scatter(values, values, c=values, norm=norm)
# also specifying vmin/vmax. Should those be ignored?
plt.scatter(values, values, c=values, norm=norm, vmin=6, vmax=10)
So the vmin/vmax have clearly "altered" the BoundaryNorm applied on the data.
According to the documentation, this should not happen.
Specifically for a BoundaryNorm (with specified bounds), it seems strange let the plotting change those bounds.
Bug report
Bug summary
The
scatter
documentation says:However, it seems that this is not the case. Is the documentation correct of the behaviour?
Code for reproduction
Actual outcome
So the vmin/vmax have clearly "altered" the BoundaryNorm applied on the data.
According to the documentation, this should not happen.
Specifically for a BoundaryNorm (with specified bounds), it seems strange let the plotting change those bounds.
Matplotlib version
print(matplotlib.get_backend())
): notebook inline backendThe text was updated successfully, but these errors were encountered: