def plot_text()

in builtin_algorithm_hpo_tabular/util/classification_report.py [0:0]


def plot_text(text, axis=None):

    if axis is None:  # for standalone plot
        plt.figure()
        ax = plt.gca()
    else:  # for plots inside a subplot
        ax = axis
        
    # set background white
    ax.set_axis_off()
    ax.set_frame_on(True)
    ax.grid(False)
    
    ax.text(x=0.8,
            y=0, 
            s=text,
            horizontalalignment="right",
            color="black")