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: Rotates the layout by the given degrees on the plane defined by
  the given two dimensions.
  
  @param angle: the angle of the rotation, specified in degrees.
  @param dim1: the first axis of the plane of the rotation.
  @param dim2: the second axis of the plane of the rotation.
  @keyword origin: the origin of the rotation. If not specified, the
    origin will be the origin of the coordinate system.
docstr_tok: ["Rotates","the","layout","by","the","given","degrees","on","the","plane","defined","by","the","given","two","dimensions",".","@","param","angle",":","the","angle","of","the","rotation",",","specified","in","degrees",".","@","param","dim1",":","the","first","axis","of","the","plane","of","the","rotation",".","@","param","dim2",":","the","second","axis","of","the","plane","of","the","rotation",".","@","keyword","origin",":","the","origin","of","the","rotation",".","If","not","specified",",","the","origin","will","be","the","origin","of","the","coordinate","system","."]
code: def rotate(self, angle, dim1=0, dim2=1, **kwds):
      """Rotates the layout by the given degrees on the plane defined by
      the given two dimensions.
  
      @param angle: the angle of the rotation, specified in degrees.
      @param dim1: the first axis of the plane of the rotation.
      @param dim2: the second axis of the plane of the rotation.
      @keyword origin: the origin of the rotation. If not specified, the
        origin will be the origin of the coordinate system.
      """
  
      origin = list(kwds.get("origin", [0.0] * self._dim))
      if len(origin) != self._dim:
          raise ValueError("origin must have %d dimensions" % self._dim)
  
      radian = angle * pi / 180.0
      cos_alpha, sin_alpha = cos(radian), sin(radian)
  
      for _idx, row in enumerate(self._coords):
          x, y = row[dim1] - origin[dim1], row[dim2] - origin[dim2]
          row[dim1] = cos_alpha * x - sin_alpha * y + origin[dim1]
          row[dim2] = sin_alpha * x + cos_alpha * y + origin[dim2]
  
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 12 for calling the Layout obj's underlying member method code with example usage: obj.rotate(angle, dim1, dim2) without return types