TreeGraph.expected_fig_size#

missionbio.mosaic.plots.fishplot.TreeGraph.expected_fig_size

TreeGraph.expected_fig_size(positions: Optional[ndarray] = None, node_sizes: Optional[ndarray] = None, margin: float = 50) Tuple[float, float]#

The plot size needed to fit the tree

Parameters:
positionsOptional[np.ndarray]

The position obtained from _estimate_node_positions. If this is not given, it is calculated using _estimate_node_positions

node_sizesOptional[np.ndarray]

The node_sizes obtained from _estimate_node_positions. If this is not given, it is calculated using _estimate_node_positions

marginfloat

The go.Figure.layout.margin value for all sides.

Returns:
width, height:

The expected size of the figure to fit all the nodes and description for the given font_size, marker_size, margin, and marker_gap.