def test_plot_xyi_plot(node_counts_list, labels): """ Test plotting xyi. """ fig, ax, tax = parameters.plot_ternary_plot(counts_list=node_counts_list, labels=labels, is_nodes=True) assert isinstance(fig, matplotlib.figure.Figure) # type: ignore assert isinstance(ax, matplotlib.axes.Axes) # type: ignore assert isinstance(tax, TernaryAxesSubplot) plt.close("all")
def test_plot_branch_plot(branch_counts_list, labels): """ Test plotting branches. """ fig, ax, tax = parameters.plot_ternary_plot(counts_list=branch_counts_list, labels=labels, is_nodes=False) assert isinstance(fig, matplotlib.figure.Figure) # type: ignore assert isinstance(ax, matplotlib.axes.Axes) # type: ignore assert isinstance(tax, ternary.ternary_axes_subplot.TernaryAxesSubplot) plt.close("all")
def plot_xyi(self, ): """ Plot multi-network ternary XYI plot. """ node_counts_list = [network.node_counts for network in self.networks] labels = [network.name for network in self.networks] return parameters.plot_ternary_plot( counts_list=node_counts_list, labels=labels, is_nodes=True, )
def plot_branch( self, label: Optional[str] = None ) -> Tuple[Figure, Axes, TernaryAxesSubplot]: """ Plot ternary plot of branch types. """ if label is None: label = self.name return plot_ternary_plot(counts_list=[self.branch_counts], labels=[label], is_nodes=False)
def test_plot_branch_plot(branch_counts_list, labels, colors): """ Test plotting branches. """ fig, ax, tax = parameters.plot_ternary_plot(counts_list=branch_counts_list, labels=labels, is_nodes=False, colors=colors) assert isinstance(fig, Figure) assert isinstance(ax, Axes) assert isinstance(tax, TernaryAxesSubplot) plt.close("all")
def plot_branch(self, ): """ Plot multi-network ternary branch type plot. """ branch_counts_list = [ network.branch_counts for network in self.networks ] labels = [network.name for network in self.networks] return parameters.plot_ternary_plot( counts_list=branch_counts_list, labels=labels, is_nodes=False, )
def plot_xyi( self, colors: Optional[List[Optional[str]]] = None, ): """ Plot multi-network ternary XYI plot. """ node_counts_list = [network.node_counts for network in self.networks] labels = [network.name for network in self.networks] return parameters.plot_ternary_plot( counts_list=node_counts_list, labels=labels, is_nodes=True, colors=colors, )
def plot_branch( self, colors: Optional[List[Optional[str]]] = None, ): """ Plot multi-network ternary branch type plot. """ branch_counts_list = [ network.branch_counts for network in self.networks ] labels = [network.name for network in self.networks] return parameters.plot_ternary_plot( counts_list=branch_counts_list, labels=labels, is_nodes=False, colors=colors, )