title: In Pyplot, How can we change the line width of a plot once it is already plotted?
body: <p>Consider the following python module '<strong>plot_figure.py</strong>' defining <strong>PlotFigure</strong>(). Note that it is a pseudo-code.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  def PlotFigure(x)
    # Some other routines..
    plt.plot(x)
    # Some other routines..
  </code></pre>
  
  <p>I would like to call plot_figure.PlotFigure, but after plotting a figure, I would like to change the line widths of this figure. Even though PlotFigure() may include other routines, the lines in the figure are plotted using plt.plot() as shown in the above pseudo-code.</p>
  
  <p>The following is the code that calls plot_figure.PlotFigure()</p>
  
  <pre><code>#!/usr/bin/python
  import matplotlib.pyplot as plt
  import plot_figure
  x_data = [ # some data ]
  plot_figure.PlotFigure(x_data)
  
  #***I would like to change the line width of the figure here***
  
  plt.show()
  </code></pre>
  
  <p>I know that I can get the figure handle using <code>fig = plt.gcf()</code>, but <code>plt.setp(fig, linewidth=2)</code> doesn't work.</p>
  
  <p>Could anyone give some suggestion on this?</p>