(self, layout=None, *args, **kwds)
return layout
Returns the layout of the graph according to a layout algorithm.

        Parameters and keyword arguments not specified here are passed to the
        layout algorithm directly. See the documentation of the layout
        algorithms for the explanation of these parameters.

        Registered layout names understood by this method are:

          - C{auto}, C{automatic}: automatic layout
            (see L{layout_auto})

          - C{bipartite}: bipartite layout (see L{layout_bipartite})

          - C{circle}, C{circular}: circular layout
            (see L{layout_circle})

          - C{dh}, C{davidson_harel}: Davidson-Harel layout (see
            L{layout_davidson_harel})

          - C{drl}: DrL layout for large graphs (see L{layout_drl})

          - C{drl_3d}: 3D DrL layout for large graphs
            (see L{layout_drl})

          - C{fr}, C{fruchterman_reingold}: Fruchterman-Reingold layout
            (see L{layout_fruchterman_reingold}).

          - C{fr_3d}, C{fr3d}, C{fruchterman_reingold_3d}: 3D Fruchterman-
            Reingold layout (see L{layout_fruchterman_reingold}).

          - C{grid}: regular grid layout in 2D (see L{layout_grid})

          - C{grid_3d}: regular grid layout in 3D (see L{layout_grid_3d})

          - C{graphopt}: the graphopt algorithm (see L{layout_graphopt})

          - C{kk}, C{kamada_kawai}: Kamada-Kawai layout
            (see L{layout_kamada_kawai})

          - C{kk_3d}, C{kk3d}, C{kamada_kawai_3d}: 3D Kamada-Kawai layout
            (see L{layout_kamada_kawai})

          - C{lgl}, C{large}, C{large_graph}: Large Graph Layout
            (see L{layout_lgl})

          - C{mds}: multidimensional scaling layout (see L{layout_mds})

          - C{random}: random layout (see L{layout_random})

          - C{random_3d}: random 3D layout (see L{layout_random})

          - C{rt}, C{tree}, C{reingold_tilford}: Reingold-Tilford tree
            layout (see L{layout_reingold_tilford})

          - C{rt_circular}, C{reingold_tilford_circular}: circular
            Reingold-Tilford tree layout
            (see L{layout_reingold_tilford_circular})

          - C{sphere}, C{spherical}, C{circle_3d}, C{circular_3d}: spherical
            layout (see L{layout_circle})

          - C{star}: star layout (see L{layout_star})

          - C{sugiyama}: Sugiyama layout (see L{layout_sugiyama})

        @param layout: the layout to use. This can be one of the registered
          layout names or a callable which returns either a L{Layout} object or
          a list of lists containing the coordinates. If C{None}, uses the
          value of the C{plotting.layout} configuration key.
        @return: a L{Layout} object.
Returns the layout of the graph according to a layout algorithm.
Returns the layout of the graph according to a layout algorithm .
def layout(self, layout=None, *args, **kwds):
        """Returns the layout of the graph according to a layout algorithm.

        Parameters and keyword arguments not specified here are passed to the
        layout algorithm directly. See the documentation of the layout
        algorithms for the explanation of these parameters.

        Registered layout names understood by this method are:

          - C{auto}, C{automatic}: automatic layout
            (see L{layout_auto})

          - C{bipartite}: bipartite layout (see L{layout_bipartite})

          - C{circle}, C{circular}: circular layout
            (see L{layout_circle})

          - C{dh}, C{davidson_harel}: Davidson-Harel layout (see
            L{layout_davidson_harel})

          - C{drl}: DrL layout for large graphs (see L{layout_drl})

          - C{drl_3d}: 3D DrL layout for large graphs
            (see L{layout_drl})

          - C{fr}, C{fruchterman_reingold}: Fruchterman-Reingold layout
            (see L{layout_fruchterman_reingold}).

          - C{fr_3d}, C{fr3d}, C{fruchterman_reingold_3d}: 3D Fruchterman-
            Reingold layout (see L{layout_fruchterman_reingold}).

          - C{grid}: regular grid layout in 2D (see L{layout_grid})

          - C{grid_3d}: regular grid layout in 3D (see L{layout_grid_3d})

          - C{graphopt}: the graphopt algorithm (see L{layout_graphopt})

          - C{kk}, C{kamada_kawai}: Kamada-Kawai layout
            (see L{layout_kamada_kawai})

          - C{kk_3d}, C{kk3d}, C{kamada_kawai_3d}: 3D Kamada-Kawai layout
            (see L{layout_kamada_kawai})

          - C{lgl}, C{large}, C{large_graph}: Large Graph Layout
            (see L{layout_lgl})

          - C{mds}: multidimensional scaling layout (see L{layout_mds})

          - C{random}: random layout (see L{layout_random})

          - C{random_3d}: random 3D layout (see L{layout_random})

          - C{rt}, C{tree}, C{reingold_tilford}: Reingold-Tilford tree
            layout (see L{layout_reingold_tilford})

          - C{rt_circular}, C{reingold_tilford_circular}: circular
            Reingold-Tilford tree layout
            (see L{layout_reingold_tilford_circular})

          - C{sphere}, C{spherical}, C{circle_3d}, C{circular_3d}: spherical
            layout (see L{layout_circle})

          - C{star}: star layout (see L{layout_star})

          - C{sugiyama}: Sugiyama layout (see L{layout_sugiyama})

        @param layout: the layout to use. This can be one of the registered
          layout names or a callable which returns either a L{Layout} object or
          a list of lists containing the coordinates. If C{None}, uses the
          value of the C{plotting.layout} configuration key.
        @return: a L{Layout} object.
        """
        if layout is None:
            layout = config["plotting.layout"]
        if hasattr(layout, "__call__"):
            method = layout
        else:
            layout = layout.lower()
            if layout[-3:] == "_3d":
                kwds["dim"] = 3
                layout = layout[:-3]
            elif layout[-2:] == "3d":
                kwds["dim"] = 3
                layout = layout[:-2]
            method = getattr(self.__class__, self._layout_mapping[layout])
        if not hasattr(method, "__call__"):
            raise ValueError("layout method must be callable")
        layout = method(self, *args, **kwds)
        if not isinstance(layout, Layout):
            layout = Layout(layout)
        return layout
def layout ( self , layout = None , * args , * * kwds ) : if layout is None : layout = config [ "plotting.layout" ] if hasattr ( layout , "__call__" ) : method = layout else : layout = layout . lower ( ) if layout [ - 3 : ] == "_3d" : kwds [ "dim" ] = 3 layout = layout [ : - 3 ] elif layout [ - 2 : ] == "3d" : kwds [ "dim" ] = 3 layout = layout [ : - 2 ] method = getattr ( self . __class__ , self . _layout_mapping [ layout ] ) if not hasattr ( method , "__call__" ) : raise ValueError ( "layout method must be callable" ) layout = method ( self , * args , * * kwds ) if not isinstance ( layout , Layout ) : layout = Layout ( layout ) return layout