quantificationlib.plot module¶
Visualization related functions
- plot_boxes(ax, error_matrix, vert=None, y_title=None, x_title=None, labels=None, colors=None)[source]¶
Function to build a boxplot to visually show the error distribution of experiments
- Parameters:
ax (Axes) – The axes to draw to
error_matrix (ndarray, shape(number_of_experiments, number_of_systems)) – Error values of the experiments
vert (bool, default: True) – If True, draws vertical boxes. If False, draw horizontal boxes.
y_title (str, optional) – y-axis title
x_title (str, optional) – x-axis title
labels (list, optional) – Label for each system
colors (list, optional) – List of colors for boxes. If None default colors are used
- plot_line_prevalences(ax, prevalence_matrix, order=None, colors=None)[source]¶
Function to build a graph to represent prevalences of experiments in a linear form. Each horizontal line corresponds to one experiment, each color is a class and its horizontal length corresponds to its proportion (prevalence).
- Parameters:
ax (Axes) – The axes to draw to
prevalence_matrix (ndarray, shape(number_of_experiments, number_of_clases)) – Prevalences of the experiments
order (str, optional) – To sort matrix based on the first column in order “ascending”, “desdending” or None
colors (list, optional) – List of colors for classes. If None list(mcolors.TABLEAU_COLORS) are used