22
33import matplotlib .lines as mlines
44import matplotlib .patches as patches
5- import matplotlib .pyplot as plt
65import numpy as np
76
87from pandas .core .dtypes .missing import notna
@@ -105,6 +104,7 @@ def _get_marker_compat(marker):
105104
106105
107106def radviz (frame , class_column , ax = None , color = None , colormap = None , ** kwds ):
107+ import matplotlib .pyplot as plt
108108
109109 def normalize (series ):
110110 a = min (series )
@@ -169,6 +169,7 @@ def normalize(series):
169169
170170def andrews_curves (frame , class_column , ax = None , samples = 200 , color = None ,
171171 colormap = None , ** kwds ):
172+ import matplotlib .pyplot as plt
172173
173174 def function (amplitudes ):
174175 def f (t ):
@@ -224,6 +225,7 @@ def f(t):
224225
225226def bootstrap_plot (series , fig = None , size = 50 , samples = 500 , ** kwds ):
226227
228+ import matplotlib .pyplot as plt
227229 # random.sample(ndarray, int) fails on python 3.3, sigh
228230 data = list (series .values )
229231 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,
270272 use_columns = False , xticks = None , colormap = None ,
271273 axvlines = True , axvlines_kwds = None , sort_labels = False ,
272274 ** kwds ):
275+ import matplotlib .pyplot as plt
273276 if axvlines_kwds is None :
274277 axvlines_kwds = {'linewidth' : 1 , 'color' : 'black' }
275278
@@ -336,6 +339,7 @@ def parallel_coordinates(frame, class_column, cols=None, ax=None, color=None,
336339
337340def lag_plot (series , lag = 1 , ax = None , ** kwds ):
338341 # workaround because `c='b'` is hardcoded in matplotlibs scatter method
342+ import matplotlib .pyplot as plt
339343 kwds .setdefault ('c' , plt .rcParams ['patch.facecolor' ])
340344
341345 data = series .values
@@ -350,6 +354,8 @@ def lag_plot(series, lag=1, ax=None, **kwds):
350354
351355
352356def autocorrelation_plot (series , ax = None , ** kwds ):
357+ import matplotlib .pyplot as plt
358+
353359 n = len (series )
354360 data = np .asarray (series )
355361 if ax is None :
0 commit comments