Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/napari_matplotlib/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def __init__(self, napari_viewer: napari.viewer.Viewer):

self.viewer = napari_viewer
self.canvas = FigureCanvas()
self.canvas.widget = self

self.canvas.figure.patch.set_facecolor("none")
self.canvas.figure.set_layout_engine("constrained")
Expand Down
6 changes: 5 additions & 1 deletion src/napari_matplotlib/tests/test_histogram.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from copy import deepcopy

import pytest

from napari_matplotlib import HistogramWidget
Expand All @@ -9,4 +11,6 @@ def test_example_q_widget(make_napari_viewer, astronaut_data):
viewer = make_napari_viewer()
viewer.add_image(astronaut_data[0], **astronaut_data[1])
fig = HistogramWidget(viewer).figure
return fig
# Need to return a copy, as original figure is too eagerley garbage
# collected by the widget
return deepcopy(fig)
6 changes: 5 additions & 1 deletion src/napari_matplotlib/tests/test_slice.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from copy import deepcopy

import pytest

from napari_matplotlib import SliceWidget
Expand All @@ -8,4 +10,6 @@ def test_slice(make_napari_viewer, brain_data):
viewer = make_napari_viewer()
viewer.add_image(brain_data[0], **brain_data[1])
fig = SliceWidget(viewer).figure
return fig
# Need to return a copy, as original figure is too eagerley garbage
# collected by the widget
return deepcopy(fig)