6
6
7
7
from matplotlib .externals import six
8
8
9
+ import matplotlib .lines as mlines
9
10
import nose
10
11
from nose .tools import assert_true , assert_raises
11
12
from timeit import repeat
12
13
import numpy as np
13
- import matplotlib as mpl
14
+
14
15
import matplotlib .pyplot as plt
15
16
from matplotlib .testing .decorators import cleanup , image_comparison
16
17
import sys
@@ -38,7 +39,7 @@ def test_invisible_Line_rendering():
38
39
ax = plt .subplot (111 )
39
40
40
41
# Create a "big" Line instance:
41
- l = mpl . lines .Line2D (x ,y )
42
+ l = mlines .Line2D (x ,y )
42
43
l .set_visible (False )
43
44
# but don't add it to the Axis instance `ax`
44
45
@@ -112,7 +113,7 @@ def test_valid_linestyles():
112
113
raise nose .SkipTest ("assert_raises as context manager "
113
114
"not supported with Python < 2.7" )
114
115
115
- line = mpl . lines .Line2D ([], [])
116
+ line = mlines .Line2D ([], [])
116
117
with assert_raises (ValueError ):
117
118
line .set_linestyle ('aardvark' )
118
119
@@ -128,7 +129,7 @@ def test_set_line_coll_dash_image():
128
129
129
130
def test_nan_is_sorted ():
130
131
# Exercises issue from PR #2744 (NaN throwing warning in _is_sorted)
131
- line = mpl . lines .Line2D ([],[])
132
+ line = mlines .Line2D ([],[])
132
133
assert_true (line ._is_sorted (np .array ([1 ,2 ,3 ])))
133
134
assert_true (not line ._is_sorted (np .array ([1 ,np .nan ,3 ])))
134
135
0 commit comments