Bug report
Bug summary
Not sure if this is really a bug or just a user issue. I expected that passing a clim tuple to pcolormesh with no vmin or vmax specified would update the color scale limits. I found that I had to use vmin and vmax instead. Maybe I am misunderstanding and vmin and vmax should always be used. However, it looks like the kwargs are passed into the QuadMesh constructor and then clim is overwritten with vmin and vmax, even in they are None and clim is given. (https://github.com/heath730/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L5629).
Code for reproduction
import matplotlib.pyplot as plt
import numpy as np
plot_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 this line be a reasonable update?
Bug report
Bug summary
Not sure if this is really a bug or just a user issue. I expected that passing a
climtuple topcolormeshwith novminorvmaxspecified would update the color scale limits. I found that I had to usevminandvmaxinstead. Maybe I am misunderstanding andvminandvmaxshould always be used. However, it looks like the kwargs are passed into theQuadMeshconstructor and thenclimis overwritten withvminandvmax, even in they are None andclimis given. (https://github.com/heath730/matplotlib/blob/master/lib/matplotlib/axes/_axes.py#L5629).Code for reproduction
Matplotlib version
print(matplotlib.get_backend())): TkAggWould something like:
Before the vmin and vmax pops on this line be a reasonable update?