Bug summary
The color bar has multiple labels with the value 0 if matplotlib.colors.SymLogNorm is used leading to a "bold-looking" label.
Code for reproduction
from matplotlib import pyplot as plt import matplotlib as mpl fig, axes = plt.subplots(1, 2, True, True) for i, ax in enumerate(axes): im = ax.imshow([[0]], norm=mpl.colors.SymLogNorm(1e-5, vmin=-1, vmax=1)) cb = plt.colorbar(im, ax=ax) # Clean up the labels zero_labelled = False for label in cb.ax.yaxis.get_ticklabels(): if label.get_text() == r'$\mathdefault{0}$': if zero_labelled: label.set_visible(False) zero_labelled = True
Actual outcome on the left, expected outcome on the right
Matplotlib version
All libraries were installed using pip in a docker image derived from python:3.
Thank you for the fix @Raab70.
Activity
tillahoffmann commented on Jan 5, 2018
Thank you for the fix @Raab70.