Skip to content

Is the reset of the colorbar's edgecolor when updating the corresponding image clim wanted behaviour? #15980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mapfiable opened this issue Dec 19, 2019 · 0 comments · Fixed by #15981
Milestone

Comments

@mapfiable
Copy link

Bug report

Bug summary

When updating the the clim of an image, the edgecolor of the colorbar is reset. This is however not the case with the ticks or label color which seems inconsistent.

Code for reproduction

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np

fig, ax = plt.subplots()
im = ax.imshow(np.arange(100).reshape((10, 10)))

divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)

colorbar = fig.colorbar(im, cax=cax)
colorbar.ax.tick_params(axis='both', colors='red')
colorbar.set_label('label')
colorbar.ax.yaxis.label.set_color('red')
colorbar.outline.set_edgecolor('red')

im.set_clim((0, 10))

plt.show()

Expected outcome

No reset of the edgecolor.

Matplotlib version

  • Operating system: Windows 10 64bit
  • Matplotlib version: 3.1.1 (via anaconda default installation)
  • Matplotlib backend: Qt5Agg
  • Python version: Python 3.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants