File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11from __future__ import print_function , absolute_import , division
22
33import pytest
4+ from distutils .version import StrictVersion
45
56from .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 )
You can’t perform that action at this time.
0 commit comments