class_docstr: Represents the layout of a graph.
  
  A layout is practically a list of coordinates in an n-dimensional
  space. This class is generic in the sense that it can store coordinates
  in any n-dimensional space.
  
  Layout objects are not associated directly with a graph. This is deliberate:
  there were times when I worked with almost identical copies of the same
  graph, the only difference was that they had different colors assigned to
  the vertices. It was particularly convenient for me to use the same layout
  for all of them, especially when I made figures for a paper. However,
  C{igraph} will of course refuse to draw a graph with a layout that has
  less coordinates than the node count of the graph.
  
  Layouts behave exactly like lists when they are accessed using the item
  index operator (C{[...]}). They can even be iterated through. Items
  returned by the index operator are only copies of the coordinates,
  but the stored coordinates can be modified by directly assigning to
  an index.
  
      >>> layout = Layout([(0, 1), (0, 2)])
      >>> coords = layout[1]
      >>> print(coords)
      [0, 2]
      >>> coords = (0, 3)
      >>> print(layout[1])
      [0, 2]
      >>> layout[1] = coords
      >>> print(layout[1])
      [0, 3]
docstr: Scales the layout.
  
  Scaling parameters can be provided either through the C{scale} keyword
  argument or through plain unnamed arguments. If a single integer or
  float is given, it is interpreted as a uniform multiplier to be applied
  on all dimensions. If it is a list or tuple, its length must be equal to
  the number of dimensions in the layout, and each element must be an
  integer or float describing the scaling coefficient in one of the
  dimensions.
  
  @keyword scale: scaling coefficients (integer, float, list or tuple)
  @keyword origin: the origin of scaling (this point will stay in place).
    Optional, defaults to the origin of the coordinate system being used.
docstr_tok: ["Scales","the","layout",".","Scaling","parameters","can","be","provided","either","through","the","C","{","scale","}","keyword","argument","or","through","plain","unnamed","arguments",".","If","a","single","integer","or","float","is","given",",","it","is","interpreted","as","a","uniform","multiplier","to","be","applied","on","all","dimensions",".","If","it","is","a","list","or","tuple",",","its","length","must","be","equal","to","the","number","of","dimensions","in","the","layout",",","and","each","element","must","be","an","integer","or","float","describing","the","scaling","coefficient","in","one","of","the","dimensions",".","@","keyword","scale",":","scaling","coefficients","(","integer",",","float",",","list","or","tuple",")","@","keyword","origin",":","the","origin","of","scaling","(","this","point","will","stay","in","place",")",".","Optional",",","defaults","to","the","origin","of","the","coordinate","system","being","used","."]
code: def scale(self, *args, **kwds):
      """Scales the layout.
  
      Scaling parameters can be provided either through the C{scale} keyword
      argument or through plain unnamed arguments. If a single integer or
      float is given, it is interpreted as a uniform multiplier to be applied
      on all dimensions. If it is a list or tuple, its length must be equal to
      the number of dimensions in the layout, and each element must be an
      integer or float describing the scaling coefficient in one of the
      dimensions.
  
      @keyword scale: scaling coefficients (integer, float, list or tuple)
      @keyword origin: the origin of scaling (this point will stay in place).
        Optional, defaults to the origin of the coordinate system being used.
      """
      origin = list(kwds.get("origin", [0.0] * self._dim))
      if len(origin) != self._dim:
          raise ValueError("origin must have %d dimensions" % self._dim)
  
      scaling = kwds.get("scale") or args
      if isinstance(scaling, (int, float)):
          scaling = [scaling]
      if len(scaling) == 0:
          raise ValueError("scaling factor must be given")
      elif len(scaling) == 1:
          if isinstance(scaling[0], (int, float)):
              scaling *= self._dim
          else:
              scaling = scaling[0]
      if len(scaling) != self._dim:
          raise ValueError(
              "scaling factor list must have %d elements" % self._dim
          )
  
      for idx, row in enumerate(self._coords):
          self._coords[idx] = [
              (row[d] - origin[d]) * scaling[d] + origin[d]
              for d in range(self._dim)
          ]
  
imports: from math import sin, cos, pi
  from igraph._igraph import GraphBase
  from igraph.drawing.utils import BoundingBox
  from igraph.statistics import RunningMean
label_desc: Use image node_id 13 for calling the Layout obj's underlying member method code with example usage: obj.scale() without return types