Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Milestone
Description
Bug report
Bug summary
Thescatter documentation says:
vmin andvmax are ignored if you pass anorm 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 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)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
- Operating system: Ubuntu 16.04
- Matplotlib version: 3.1.0
- Matplotlib backend (
print(matplotlib.get_backend())): notebook inline backend - Python version: 3.7
- Installed from conda-forge

