title: pass in a list of labels for generation of figures in for loop
body: <p>Currently trying to save figures each with a name coming from a list in a for loop.</p>
  <p>Input:</p>
  <pre><code> plot_l=['test1','test2',.........]  
  
  for i in range(ydata.shape[1]):
              plt.figure()
              fig, ax = plt.subplots(constrained_layout=True)
              ax.plot(dsfg,ydata[i])
              ax.set_xlabel('dsfg')
              ax.set_ylabel('tzui')
              ax.set_title('misc ') 
              secax.set_xlabel('len')
              plt.savefig('plot_l{0}.jpg'.format(i))
              plt.close()
  </code></pre>
  <p>Output: The figures are generated but with incorrect figure name, ie,</p>
  <pre><code>plot_l1.png
  plot_l2.png
  plot_l3.png
  </code></pre>
  <p>Desired Output:</p>
  <pre><code>test1.png
  test2.png
  test3.png
  </code></pre>
  <p>I have also tried <code>plt.savefig(plot_l[i]+'.png')</code> in place of <code>plt.savefig('plot_l{0}.jpg'.format(i))</code> Suggestions are welcome....thanks</p>