PhyloTree.expected_fig_size#

missionbio.plotting.phylotree.PhyloTree.expected_fig_size

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

Estimate the plot size required 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.