class_docstr: Svg related methods
class_docstr_tok: ["Svg","related","methods"]
docstr: Make a new svg node which can be transposed if horizontal
docstr_tok: ["Make","a","new","svg","node","which","can","be","transposed","if","horizontal"]
code: def transposable_node(
      self, parent=None, tag="g", attrib=None, **extras
  ):
      """Make a new svg node which can be transposed if horizontal"""
      if self.graph.horizontal:
          for key1, key2 in (
              ("x", "y"),
              ("width", "height"),
              ("cx", "cy"),
          ):
              attr1 = extras.get(key1, None)
              attr2 = extras.get(key2, None)
              if attr2:
                  extras[key1] = attr2
              elif attr1:
                  del extras[key1]
              if attr1:
                  extras[key2] = attr1
              elif attr2:
                  del extras[key2]
      return self.node(parent, tag, attrib, **extras)
  
imports: from __future__ import division
  import io
  import json
  import os
  from datetime import date, datetime
  from math import pi
  from numbers import Number
  from urllib.parse import quote_plus
  from pygal import __version__
  from pygal.etree import etree
  from pygal.util import coord_abs_project, coord_diff, coord_dual, coord_format, coord_project, minify_css, template
label_desc: Use image node_id 5 for calling the Svg obj's underlying member method code with example usage: obj.transposable_node(parent, tag, attrib) and returns: self