Skip to content

Commit 359a9fe

Browse files
committed
Resolves matplotlib#96.
Not a nice global fix, but by setting the test fixture viewer's theme to light, napari-matplotlib will give axes dark grey axes, labels, and ticks.
1 parent efd3c80 commit 359a9fe

9 files changed

+6
-0
lines changed
Loading
Loading
Loading
Loading
Loading
Loading

src/napari_matplotlib/tests/test_histogram.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@pytest.mark.mpl_image_compare
1313
def test_histogram_2D(make_napari_viewer, astronaut_data):
1414
viewer = make_napari_viewer()
15+
viewer.theme = "light"
1516
viewer.add_image(astronaut_data[0], **astronaut_data[1])
1617
fig = HistogramWidget(viewer).figure
1718
# Need to return a copy, as original figure is too eagerley garbage
@@ -22,6 +23,7 @@ def test_histogram_2D(make_napari_viewer, astronaut_data):
2223
@pytest.mark.mpl_image_compare
2324
def test_histogram_3D(make_napari_viewer, brain_data):
2425
viewer = make_napari_viewer()
26+
viewer.theme = "light"
2527
viewer.add_image(brain_data[0], **brain_data[1])
2628
fig = HistogramWidget(viewer).figure
2729
# Need to return a copy, as original figure is too eagerley garbage

src/napari_matplotlib/tests/test_scatter.py

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@pytest.mark.mpl_image_compare
1212
def test_scatter_2D(make_napari_viewer, astronaut_data):
1313
viewer = make_napari_viewer()
14+
viewer.theme = "light"
1415
widget = ScatterWidget(viewer)
1516
fig = widget.figure
1617

@@ -31,6 +32,7 @@ def test_scatter_2D(make_napari_viewer, astronaut_data):
3132
@pytest.mark.mpl_image_compare
3233
def test_features_scatter_widget_2D(make_napari_viewer):
3334
viewer = make_napari_viewer()
35+
viewer.theme = "light"
3436
widget = FeaturesScatterWidget(viewer)
3537

3638
# make the points data

src/napari_matplotlib/tests/test_slice.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@pytest.mark.mpl_image_compare
99
def test_slice_3D(make_napari_viewer, brain_data):
1010
viewer = make_napari_viewer()
11+
viewer.theme = "light"
1112
viewer.add_image(brain_data[0], **brain_data[1])
1213
fig = SliceWidget(viewer).figure
1314
# Need to return a copy, as original figure is too eagerley garbage
@@ -18,6 +19,7 @@ def test_slice_3D(make_napari_viewer, brain_data):
1819
@pytest.mark.mpl_image_compare
1920
def test_slice_2D(make_napari_viewer, astronaut_data):
2021
viewer = make_napari_viewer()
22+
viewer.theme = "light"
2123
viewer.add_image(astronaut_data[0], **astronaut_data[1])
2224
fig = SliceWidget(viewer).figure
2325
# Need to return a copy, as original figure is too eagerley garbage

0 commit comments

Comments
 (0)