title: *args calling plt.plot() for each optional argument
body: <p>I'm having some trouble with passing an arbitrary number of arguments to <code>plt.plot()</code>. For each  argument I try to pass via <code>*args</code> my function calls <code>plt.plot()</code> two times creating duplicates for each optional argument. The <code>read_n_plot</code> function is meant to read some datafile, spit out the data as lists, and create a plot of said data. If I want to create a plot of an XRD standard for a crystal I want to make it easily distinguishable from whatever experimental data I'm comparing it with.</p>
  <p>From what I understand <code>*args</code> is a tuple containing all the arguments passed to my function. But I can't seem to figure out how to pass everything inside *args as is, and not calling <code>plt.plot(arg1) -&gt; plt.plot(arg2) -&gt;</code> etc</p>
  <p>Got any hints I could try?</p>
  <p>Here is my code:</p>
  <pre><code>import matplotlib.pyplot as plt
  
  #def read_n_plot(datafile, color, thickness, style = '-', *args):
  def read_n_plot(datafile, *args, **kwargs):
      vinkel = []
      intensitet = []
      with open(datafile, encoding='utf8', errors='ignore') as f:
          if datafile.endswith('.int'):
              next(f); next(f)
          lines = f.readlines()
          for line in lines:
              if line and line[0].isalpha():
                  continue
              data = line.split()
              theta, counts = float(data[0]), float(data[1])
              vinkel.append(theta)
              intensitet.append(counts)
      intensitet_norm = [i/max(intensitet) for i in intensitet]
      plt.plot(vinkel, intensitet_norm, label = datafile, *args, **kwargs)
      return vinkel, intensitet_norm
  
  plt.figure(figsize=(16,9))
  read_n_plot('NaCl_data.xy', 'k', '--', lw = 1.0)
  plt.legend(loc='best')
  plt.xlabel(r'$2\theta$')
  plt.xlim(0, 65)
  plt.ylabel('Intensitet (a.u.)')
  plt.tick_params(left=None)
  plt.yticks([])
  plt.show()
  </code></pre>
  <p>Example below uses standard powder XRD data for <code>NaCl</code>. It seems the <code>'--'</code> argument for <code>linestyle</code> didn't get through at all. The legend says there are two plots.</p>
  <p>NaCl XRD data duplicate:</p>
  <p><img src="https://i.stack.imgur.com/MAZy6.png" alt="NaCl XRD data duplicate" /></p>