Closed
Description
Bug report
Bug summary
After upgrading to Matplotlib v3.0.0, the tick marks on the colorbar are no longer placed correctly when using a matplotlib.colors.LogNorm normalization.
Code for reproduction
The code is embedded in a class defined within the NeXpy application, but uses standard Matplotlib function calls. Here are the relevant extracted lines:
from matplotlib.colors import LogNorm, Normalize, SymLogNorm
from matplotlib.ticker import AutoLocator, LogLocator, ScalarFormatter
from matplotlib.ticker import LogFormatterSciNotation as LogFormatter
self.norm = LogNorm(self.vaxis.lo, self.vaxis.hi)
self.locator = LogLocator()
self.formatter = LogFormatter()
self.image = ax.pcolormesh(x, y, self.v, cmap=self.cmap, **opts)
self.image.set_norm(self.norm)
self.colorbar = self.figure.colorbar(self.image, ax=ax, norm=self.norm)
self.colorbar.locator = self.locator
self.colorbar.formatter = self.formatter
self.colorbar.update_normal(self.image)
Actual outcome
Expected outcome
Matplotlib version
- Operating system: Mac OS 10.12.6
- Matplotlib version: 3.0.0
- Matplotlib backend: Qt5Agg
- Python version: 3.6.5
I got the same result when using conda to install v3.0.0 or pip to install the latest development version.