class documentation
class AbstractGraphDrawer(AbstractDrawer): (source)
已知的子类:igraph.drawing.cairo.graph.AbstractCairoGraphDrawer, igraph.drawing.graph.CytoscapeGraphDrawer, igraph.drawing.graph.GephiGraphStreamingDrawer, igraph.drawing.matplotlib.graph.GraphArtist, igraph.drawing.matplotlib.graph.MatplotlibGraphDrawer, igraph.drawing.plotly.graph.PlotlyGraphDrawer
抽象类,作为绘制 igraph.Graph 的任何内容的基础类。
| 静态方法 | ensure |
确保layout是Layout实例的辅助方法。如果不是,该方法将尝试根据以下规则将其转换为Layout: |
| 方法 | draw |
抽象方法,必须在派生类中实现。 |
| 静态方法 | _determine |
返回给定图的边必须绘制的顺序,假设相关的关键字参数(edge_order 和 edge_order_by)在 kwds 中以字典形式给出。如果既没有 edge_order... |
| 静态方法 | _determine |
返回给定图的顶点必须绘制的顺序,假设相关的关键字参数(vertex_order 和 vertex_order_by)在 kwds 中以字典形式给出。如果两者都没有... |
辅助方法,确保layout是Layout的一个实例。如果不是,该方法将尝试根据以下规则将其转换为Layout:
- If layout is a string, it is assumed to be a name of an igraph layout, and it will be passed on to the layout method of the given graph if graph is not None.
- If layout is None and graph has a "layout" attribute, call this same function with the value of that attribute.
- If layout is None and graph does not have a "layout" attribute, the layout method of graph will be invoked with no parameters, which will call the default layout algorithm.
- Otherwise, layout will be passed on to the constructor of
Layout. This handles lists of lists, lists of tuples and such.
如果 layout 已经是一个 Layout 实例,它仍然会被复制并返回一个副本。这是因为图形绘制器可以为了其目的而转换布局,我们不希望这种转换传播回调用者。
overridden in
igraph.drawing.cairo.graph.CairoGraphDrawer, igraph.drawing.graph.CytoscapeGraphDrawer, igraph.drawing.graph.GephiGraphStreamingDrawer, igraph.drawing.matplotlib.graph.GraphArtist, igraph.drawing.matplotlib.graph.MatplotlibGraphDrawer, igraph.drawing.plotly.graph.PlotlyGraphDrawer抽象方法,必须在派生类中实现。
返回给定图的边需要绘制的顺序,假设相关的关键字参数(edge_order 和 edge_order_by)在 kwds 中以字典形式给出。如果 kwds 中既没有 edge_order 也没有 edge_order_by,则此函数返回 None,表示图形绘制器可以自由选择最方便的边顺序。