amachine.am_visualization.am_barycentric_plot
1import ternary 2import numpy as np 3 4def triangular_barycentric_plot( 5 coords : np.ndarray, 6 coord_classes : np.ndarray, 7 axis_labels : tuple[str, str, str], 8 title : str="" ) : 9 10 figure, tax = ternary.figure(scale=40) 11 12 tax.boundary(linewidth=2.0) 13 14 fontsize = 20 15 tax.set_title("Simplex Boundary and Gridlines", fontsize=fontsize) 16 17 tax.left_axis_label( axis_labels[0], fontsize=fontsize) 18 tax.right_axis_label( axis_labels[1], fontsize=fontsize) 19 tax.bottom_axis_label( axis_labels[2], fontsize=fontsize) 20 21 # Remove default Matplotlib Axes 22 tax.clear_matplotlib_ticks() 23 24 tax.scatter( coords, marker='*' ) 25 26 ternary.plt.show()
def
triangular_barycentric_plot( coords: numpy.ndarray, coord_classes: numpy.ndarray, axis_labels: tuple[str, str, str], title: str = ''):
5def triangular_barycentric_plot( 6 coords : np.ndarray, 7 coord_classes : np.ndarray, 8 axis_labels : tuple[str, str, str], 9 title : str="" ) : 10 11 figure, tax = ternary.figure(scale=40) 12 13 tax.boundary(linewidth=2.0) 14 15 fontsize = 20 16 tax.set_title("Simplex Boundary and Gridlines", fontsize=fontsize) 17 18 tax.left_axis_label( axis_labels[0], fontsize=fontsize) 19 tax.right_axis_label( axis_labels[1], fontsize=fontsize) 20 tax.bottom_axis_label( axis_labels[2], fontsize=fontsize) 21 22 # Remove default Matplotlib Axes 23 tax.clear_matplotlib_ticks() 24 25 tax.scatter( coords, marker='*' ) 26 27 ternary.plt.show()