diff --git a/kwant/tests/test_plotter.py b/kwant/tests/test_plotter.py
index 862dd829ade71069b5714b3c96e2799ec824284d..31227beb30d2878821d7df964f02f86deded251d 100644
--- a/kwant/tests/test_plotter.py
+++ b/kwant/tests/test_plotter.py
@@ -39,7 +39,7 @@ from kwant import plotter
 from kwant import _plotter  # for mpl_available
 
 
-@pytest.mark.skipif(not plotter.mpl_available, reason="Matplotlib unavailable.")
+@pytest.mark.skipif(not _plotter.mpl_available, reason="Matplotlib unavailable.")
 def test_matplotlib_backend_unset():
     """Simply importing Kwant should not set the matplotlib backend."""
     assert matplotlib_backend_chosen is False