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
The color bar has multiple labels with the value 0 ifmatplotlib.colors.SymLogNorm
is used leading to a "bold-looking" label.
Code for reproduction
frommatplotlibimportpyplotaspltimportmatplotlibasmplfig,axes=plt.subplots(1,2,True,True)fori,axinenumerate(axes):im=ax.imshow([[0]],norm=mpl.colors.SymLogNorm(1e-5,vmin=-1,vmax=1))cb=plt.colorbar(im,ax=ax)# Clean up the labelszero_labelled=Falseforlabelincb.ax.yaxis.get_ticklabels():iflabel.get_text()==r'$\mathdefault{0}$':ifzero_labelled:label.set_visible(False)zero_labelled=True
Actual outcome on the left, expected outcome on the right
Matplotlib version
- Operating system: Linux 1061836d2c20 4.9.49-mobyFix autofmt_xdate() when using in conjunction with twinx() #1 SMP Fri Dec 8 13:40:02 UTC 2017 x86_64 GNU/Linux
- Matplotlib version: 2.1.1
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 3.6.3
- Jupyter version (if applicable): 4.4.0
- Other libraries: numpy (1.13.3)
All libraries were installed using pip in a docker image derived frompython:3
.
Metadata
Metadata
Assignees
Labels
No labels