File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
src/napari_matplotlib/tests Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1- from copy import deepcopy
2-
31import napari
42import numpy as np
53import pytest
@@ -110,11 +108,13 @@ def test_no_theme_side_effects(make_napari_viewer):
110108
111109 # some plotting unrelated to napari-matplotlib
112110 image = np .random .random ((3 , 3 ))
113- plt .imshow (image )
114- plt .xlabel ("something unrelated to napari (x)" )
115- plt .ylabel ("something unrelated to napari (y)" )
116- plt .title ("this plot style should not change with napari styles or themes" )
117- plt .tight_layout ()
118- unrelated_figure = plt .gcf ()
119-
120- return deepcopy (unrelated_figure )
111+ unrelated_figure , ax = plt .subplots ()
112+ ax .imshow (image )
113+ ax .set_xlabel ("something unrelated to napari (x)" )
114+ ax .set_ylabel ("something unrelated to napari (y)" )
115+ ax .set_title (
116+ "this plot style should not change with napari styles or themes"
117+ )
118+ unrelated_figure .tight_layout ()
119+
120+ return unrelated_figure
You can’t perform that action at this time.
0 commit comments