Skip to content

Commit 206f71f

Browse files
committed
used correct refresh functions to make it work for different layer types
1 parent ee4f9a8 commit 206f71f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/napari_matplotlib/histogram.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,11 @@ def draw(self) -> None:
175175
self.layers[0].color = self.x_axis_key
176176
else:
177177
colormap = None
178+
179+
# apply new colors to the layer
178180
self.viewer.layers[self.layers[0].name].refresh_colors(True)
179-
181+
self.viewer.layers[self.layers[0].name].refresh()
182+
180183
# Draw the histogram
181184
data, x_axis_name = self._get_data()
182185

0 commit comments

Comments
 (0)