Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug report
Bug summary
Not sure if this is really a bug or just a user issue. I expected that passing aclim
tuple topcolormesh
with novmin
orvmax
specified would update the color scale limits. I found that I had to usevmin
andvmax
instead. Maybe I am misunderstanding andvmin
andvmax
should always be used. However, it looks like the kwargs are passed into theQuadMesh
constructor and thenclim
is overwritten withvmin
andvmax
, even in they are None andclim
is given. (https://github.com/heath730/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L5629).
Code for reproduction
importmatplotlib.pyplotaspltimportnumpyasnpplot_me=np.random.rand(5,5)plt.subplot(211)plt.title("Expected")plt.pcolormesh(plot_me,vmin=0,vmax=0.5)plt.colorbar()plt.subplot(212)plt.title("Result")plt.pcolormesh(plot_me,clim=(0,0.5))plt.colorbar()plt.show()
Matplotlib version
- Operating system: win7
- Matplotlib version: 2.1.2
- Matplotlib backend (
print(matplotlib.get_backend())
): TkAgg - Python version: 3.5.1
- Jupyter version (if applicable):
- Other libraries:
Would something like:
(vmin,vmax)=kwargs.pop('clim', (None,None))
Before the vmin and vmax pops on thisline be a reasonable update?