def plot_acf(x, ax=None, lags=None, alpha=0.05, use_vlines=True, unbiased=False, fft=False, title='Autocorrelation', zero=True, **kwargs):
 (fig, ax) = utils.create_mpl_ax(ax)
 (lags, nlags, irregular) = _prepare_data_corr_plot(x, lags, zero)
 confint = None
 if (alpha is None):
  acf_x = acf(x, nlags=nlags, alpha=alpha, fft=fft, unbiased=unbiased)
 else:
  (acf_x, confint) = acf(x, nlags=nlags, alpha=alpha, fft=fft, unbiased=unbiased)
 _plot_corr(ax, title, acf_x, confint, lags, irregular, use_vlines, **kwargs)
 return fig

def plot_acf ( x , ax = None , lags = None , alpha = 0.05 , use_vlines = True , unbiased = False , fft = False , title = 'Autocorrelation' , zero = True , ** kwargs ) : ( fig , ax ) = utils . create_mpl_ax ( ax ) ( lags , nlags , irregular ) = _prepare_data_corr_plot ( x , lags , zero ) confint = None if ( alpha is None ) : acf_x = acf ( x , nlags = nlags , alpha = alpha , fft = fft , unbiased = unbiased ) else : ( acf_x , confint ) = acf ( x , nlags = nlags , alpha = alpha , fft = fft , unbiased = unbiased ) _plot_corr ( ax , title , acf_x , confint , lags , irregular , use_vlines , ** kwargs ) return fig
plot the autocorrelation function plots lags on the horizontal and the correlations on vertical axis .