We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d79cdeb commit 6b53724Copy full SHA for 6b53724
lib/matplotlib/backends/_backend_tk.py
@@ -665,7 +665,7 @@ def _set_image_for_button(self, button):
665
# the dark background.
666
foreground = (255 / 65535) * np.array(
667
button.winfo_rgb(button.cget("foreground")))
668
- image_data = np.asarray(im)
+ image_data = np.asarray(im).copy()
669
black_mask = (image_data[..., :3] == 0).all(axis=-1)
670
image_data[black_mask, :3] = foreground
671
im = Image.fromarray(image_data, mode="RGBA")
0 commit comments