title: Fail to set figure gid in python matplotlib
body: <p>I want to set figure gid in matplotlib and save it into svg file. I found that I can get correct result by calling <code>get_gid()</code> but fail to get in svg file.</p>
  
  <p>The testing code I use is like this:</p>
  
  <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
  
  FIGURE_ID = "the_figure"
  FIGURE_PATCH_ID = "the_figure_patch"
  
  fig = plt.figure(figsize=(15, 9))
  fig.clf()
  fig.set_gid(FIGURE_ID)
  fig.patch.set_gid(FIGURE_PATCH_ID)
  
  print(fig.get_gid())
  print(fig.patch.get_gid())
  
  fig.savefig('id_test.svg', format='svg')
  </code></pre>
  
  <p>And the output from console is:</p>
  
  <pre class="lang-sh prettyprint-override"><code>the_figure
  the_figure_patch
  </code></pre>
  
  <p>But when I open the svg file, it comes like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt;
  &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;!-- Created with matplotlib (https://matplotlib.org/) --&gt;
  &lt;svg height="648pt" version="1.1" viewBox="0 0 1080 648" width="1080pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;
   &lt;defs&gt;
    &lt;style type="text/css"&gt;
  *{stroke-linecap:butt;stroke-linejoin:round;}
    &lt;/style&gt;
   &lt;/defs&gt;
   &lt;g id="figure_1"&gt;
    &lt;g id="the_figure_patch"&gt;
     &lt;path d="M 0 648 
  L 1080 648 
  L 1080 0 
  L 0 0 
  z
  " style="fill:#ffffff;"/&gt;
    &lt;/g&gt;
   &lt;/g&gt;
  &lt;/svg&gt;
  </code></pre>
  
  <p>Which proves that <strong>the patch gid has been changed</strong>, but <strong>the figure gid remains</strong>. Please help me to figure out my naive problem! Thank you in advance!</p>