2
2
3
3
import matplotlib .lines as mlines
4
4
import matplotlib .patches as patches
5
- import matplotlib .pyplot as plt
6
5
import numpy as np
7
6
8
7
from pandas .core .dtypes .missing import notna
@@ -105,6 +104,7 @@ def _get_marker_compat(marker):
105
104
106
105
107
106
def radviz (frame , class_column , ax = None , color = None , colormap = None , ** kwds ):
107
+ import matplotlib .pyplot as plt
108
108
109
109
def normalize (series ):
110
110
a = min (series )
@@ -169,6 +169,7 @@ def normalize(series):
169
169
170
170
def andrews_curves (frame , class_column , ax = None , samples = 200 , color = None ,
171
171
colormap = None , ** kwds ):
172
+ import matplotlib .pyplot as plt
172
173
173
174
def function (amplitudes ):
174
175
def f (t ):
@@ -224,6 +225,7 @@ def f(t):
224
225
225
226
def bootstrap_plot (series , fig = None , size = 50 , samples = 500 , ** kwds ):
226
227
228
+ import matplotlib .pyplot as plt
227
229
# random.sample(ndarray, int) fails on python 3.3, sigh
228
230
data = list (series .values )
229
231
samplings = [random .sample (data , size ) for _ in range (samples )]
@@ -270,6 +272,7 @@ def parallel_coordinates(frame, class_column, cols=None, ax=None, color=None,
270
272
use_columns = False , xticks = None , colormap = None ,
271
273
axvlines = True , axvlines_kwds = None , sort_labels = False ,
272
274
** kwds ):
275
+ import matplotlib .pyplot as plt
273
276
if axvlines_kwds is None :
274
277
axvlines_kwds = {'linewidth' : 1 , 'color' : 'black' }
275
278
@@ -336,6 +339,7 @@ def parallel_coordinates(frame, class_column, cols=None, ax=None, color=None,
336
339
337
340
def lag_plot (series , lag = 1 , ax = None , ** kwds ):
338
341
# workaround because `c='b'` is hardcoded in matplotlibs scatter method
342
+ import matplotlib .pyplot as plt
339
343
kwds .setdefault ('c' , plt .rcParams ['patch.facecolor' ])
340
344
341
345
data = series .values
@@ -350,6 +354,8 @@ def lag_plot(series, lag=1, ax=None, **kwds):
350
354
351
355
352
356
def autocorrelation_plot (series , ax = None , ** kwds ):
357
+ import matplotlib .pyplot as plt
358
+
353
359
n = len (series )
354
360
data = np .asarray (series )
355
361
if ax is None :
0 commit comments