title: How can I merge two shapes in svg?
body: <p>I have two shapes: circle and rectangle. Want to convert them into one figure. Are there any ways to do that in SVG code?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;svg width="400" height="400"&gt;
       &lt;defs&gt;
      &lt;g id="shape" fill="none" stroke="red"&gt;
        &lt;rect x="40" y="50" width="40" height="70" /&gt;
        &lt;circle cx="50" cy="50" r="50" /&gt;
      &lt;/g&gt;
    &lt;/defs&gt;
  
    &lt;use xlink:href="#shape" x="50" y="50"  /&gt;
    &lt;use xlink:href="#shape" x="200" y="50" /&gt;
  
  &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Like this:
  <img src="https://i.stack.imgur.com/uaahW.png" alt="like this"></p>