title: Difficulty setting a legend with statsmodels Python package
body: <p>I'm currently using the statsmodels Python package in order to plot an autocorrelation graph for two assets that I have (it's for a finance assignment as part of my masters), but I'm having issues with setting a legend so that the markers correspond to the actual assets. For instance, the blue marker corresponds to 'Asset A', whereas the green marker corresponds to 'Asset B'. However, an additional two lines keep appearing in the legend, and I somehow can't get rid of them! All I want to do is have a legend with two markers that correspond to each asset, but dealing with plots for this package has been an absolute nightmare so far, and has been considerably harder than dealing with matplotlib or anything I've stumbled upon ever before! My current code is as follows:</p>
  
  <pre><code>acf_assetA=sm.tsa.stattools.acf(returns_assetA,nlags=40)
  acf_assetB=sm.tsa.stattools.acf(returns_assetB,nlags=40)
  legendA='Asset A'
  legendB='Asset B'
  legendC='Asset C'
  legendD='Asset B'
  autocorr_plot1,ax1=plt.subplots(figsize=(6,5))
  ax1.set_xlabel('Lag')
  autocorr_plot1=sm.tsa.graphics.plot_acf(returns_assetA,ax=ax1,lags=np.arange(40),label='Asset A')
  autocorr_plot2=sm.tsa.graphics.plot_acf(returns_assetB,ax=ax1,lags=np.arange(40),label='Asset B')
  ax1.legend([legendA,legendB,legendC,legendD],loc='best',shadow=True)
  
  return autocorr_plot1, autocorr_plot2, acf_assetA, acf_assetB
  </code></pre>
  
  <p>It's quite useful to know that</p>
  
  <pre><code>returns_assetA, returns_assetB
  </code></pre>
  
  <p>are simply the returns for my assets contained within a Pandas dataframe.</p>
  
  <p>And this is how the plot that I keep obtaining looks like (ignore the 'Asset C' part of the legend - I just simply put that because I keep being forced to include four inputs for my legend in order for the green markers to show up):</p>
  
  <p><a href="https://i.stack.imgur.com/7lHAu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7lHAu.png" alt=""></a></p>
  
  <p>Any kind of help with going about this legend issue would be highly appreciated. Thank you very much in advance!</p>