def plot_acf_results(acfp, outfile, maxlags=<NUM_LIT>, yrange=(-<NUM_LIT>,<NUM_LIT>)):
import matplotlib.pyplot as plt<EOL>lags = acfp['<STR_LIT>']['<STR_LIT>'][:maxlags]<EOL>smoothedacf = acfp['<STR_LIT>'][:maxlags]<EOL>unsmoothedacf = acfp['<STR_LIT>']['<STR_LIT>'][:maxlags]<EOL>acfparams = acfp['<STR_LIT>']['<STR_LIT>'].copy()<EOL>acfparams.update({'<STR_LIT>': int(acfp['<STR_LIT>']['<STR_LIT>']/<NUM_LIT>)})<EOL>fig, ax1 = plt.subplots()<EOL>ax1.plot(lags, unsmoothedacf, label='<STR_LIT>',color='<STR_LIT>')<EOL>ax1.plot(lags, smoothedacf, label='<STR_LIT>', color='<STR_LIT>')<EOL>ax1.set_xlim((<NUM_LIT:0>,maxlags))<EOL>ax1.set_xlabel('<STR_LIT>')<EOL>acfmaxinds = acfp['<STR_LIT>']['<STR_LIT>']<EOL>for i, maxind in enumerate(acfmaxinds):<EOL><INDENT>if i == <NUM_LIT:0>:<EOL><INDENT>ax1.axvline(maxind,<EOL>linewidth=<NUM_LIT>,<EOL>color='<STR_LIT>',<EOL>ymin=<NUM_LIT>, ymax=<NUM_LIT>,<EOL>label='<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>ax1.axvline(maxind,<EOL>linewidth=<NUM_LIT>,<EOL>color='<STR_LIT>',<EOL>ymin=<NUM_LIT>, ymax=<NUM_LIT>)<EOL><DEDENT><DEDENT>plt.ylabel('<STR_LIT>')<EOL>plt.ylim(yrange)<EOL>ax1.legend()<EOL>plt.title('<STR_LIT:%s>' % repr(acfparams))<EOL>plt.tight_layout()<EOL>plt.savefig(outfile)<EOL>plt.close('<STR_LIT:all>')<EOL>return outfile<EOL>
This plots the unsmoothed/smoothed ACF vs lag.

Parameters
----------

acfp : dict
    This is the dict returned from `macf_period_find` below.

outfile : str
    The output file the plot will be written to.

maxlags: int
    The maximum number of lags to include in the plot.

yrange : sequence of two floats
    The y-range of the ACF vs. lag plot to use.