pyworkflow.gui.graph_layout module

class pyworkflow.gui.graph_layout.GraphLayout[source]

Bases: object

Base class for all algorithm that implement functions to organize a graph in a plane.

draw(graph, **kwargs)[source]

Setup the nodes position in the plane.

getFontScaleFactor()[source]
Returns

The scale factor between default font size 10, and current one

getY()[source]
Returns

Y distance affected by the font size

class pyworkflow.gui.graph_layout.LevelTreeLayout(partial=False)[source]

Bases: GraphLayout

Organize the nodes of the graph by levels. It will recursively organize children and then fit the sibling trees.

draw(graph, **kwargs)[source]

Organize nodes of the graph in the plane. Nodes should have x, y, width and height attributes. x and y will be modified.