Skip to content

Commit f51cc7a

Browse files
committed
boost supported mpl version again
1 parent 624e02a commit f51cc7a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/visualization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ to plot an image slice.
3434
.. warning::
3535

3636
There are known incompatibilities with the above plotting approach:
37-
matplotlib versions ``<2`` will crash, and you will have to clear the plot
37+
matplotlib versions ``<2.1`` will crash, and you will have to clear the plot
3838
window to reset it.
3939

4040

spectral_cube/tests/test_visualization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import print_function, absolute_import, division
22

33
import pytest
4+
from distutils.version import StrictVersion
45

56
from .test_spectral_cube import cube_and_raw
67

@@ -22,8 +23,9 @@ def test_proj_imshow():
2223
plt = pytest.importorskip('matplotlib.pyplot')
2324
cube, data = cube_and_raw('vda_Jybeam_lower.fits')
2425
mom0 = cube.moment0()
25-
if int(plt.matplotlib.__version__[0]) < 2:
26+
if StrictVersion(plt.matplotlib.__version__) < StrictVersion('2.1'):
2627
# imshow is now only compatible with more recent versions of matplotlib
28+
# (apparently 2.0.2 was still incompatible)
2729
plt.imshow(mom0.value)
2830
else:
2931
plt.imshow(mom0)

0 commit comments

Comments
 (0)