Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 21b5823

Browse filesBrowse files
committed
Resolves #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 20310d7 commit 21b5823
Copy full SHA for 21b5823

11 files changed

+7
-0
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading

‎src/napari_matplotlib/tests/scatter/test_scatter.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/scatter/test_scatter.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@pytest.mark.mpl_image_compare
99
def test_scatter_2D(make_napari_viewer, astronaut_data):
1010
viewer = make_napari_viewer()
11+
viewer.theme = "light"
1112
widget = ScatterWidget(viewer)
1213
fig = widget.figure
1314

@@ -28,6 +29,7 @@ def test_scatter_2D(make_napari_viewer, astronaut_data):
2829
@pytest.mark.mpl_image_compare
2930
def test_scatter_3D(make_napari_viewer, brain_data):
3031
viewer = make_napari_viewer()
32+
viewer.theme = "light"
3133
widget = ScatterWidget(viewer)
3234
fig = widget.figure
3335

‎src/napari_matplotlib/tests/scatter/test_scatter_features.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/scatter/test_scatter_features.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@pytest.mark.mpl_image_compare
1212
def test_features_scatter_widget_2D(make_napari_viewer):
1313
viewer = make_napari_viewer()
14+
viewer.theme = "light"
1415
widget = FeaturesScatterWidget(viewer)
1516

1617
# make the points data

‎src/napari_matplotlib/tests/test_histogram.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/test_histogram.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@pytest.mark.mpl_image_compare
99
def test_histogram_2D(make_napari_viewer, astronaut_data):
1010
viewer = make_napari_viewer()
11+
viewer.theme = "light"
1112
viewer.add_image(astronaut_data[0], **astronaut_data[1])
1213
fig = HistogramWidget(viewer).figure
1314
# Need to return a copy, as original figure is too eagerley garbage
@@ -18,6 +19,7 @@ def test_histogram_2D(make_napari_viewer, astronaut_data):
1819
@pytest.mark.mpl_image_compare
1920
def test_histogram_3D(make_napari_viewer, brain_data):
2021
viewer = make_napari_viewer()
22+
viewer.theme = "light"
2123
viewer.add_image(brain_data[0], **brain_data[1])
2224
axis = viewer.dims.last_used
2325
slice_no = brain_data[0].shape[0] - 1

‎src/napari_matplotlib/tests/test_slice.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/tests/test_slice.py
+2Lines changed: 2 additions & 0 deletions
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
axis = viewer.dims.last_used
1314
slice_no = brain_data[0].shape[0] - 1
@@ -21,6 +22,7 @@ def test_slice_3D(make_napari_viewer, brain_data):
2122
@pytest.mark.mpl_image_compare
2223
def test_slice_2D(make_napari_viewer, astronaut_data):
2324
viewer = make_napari_viewer()
25+
viewer.theme = "light"
2426
viewer.add_image(astronaut_data[0], **astronaut_data[1])
2527
fig = SliceWidget(viewer).figure
2628
# Need to return a copy, as original figure is too eagerley garbage

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.