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
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:
frommatplotlib.colorsimportLogNorm,Normalize,SymLogNormfrommatplotlib.tickerimportAutoLocator,LogLocator,ScalarFormatterfrommatplotlib.tickerimportLogFormatterSciNotationasLogFormatterself.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.locatorself.colorbar.formatter=self.formatterself.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.