malet.plot_utils.plot_drawer#
Functions#
|
Draws curve of y_field over arbitrary x_field setted as index of the dataframe. |
|
Draws curve of y_field over arbitrary x_field setted as index of the dataframe. |
|
Draws bar graph of y_field over arbitrary x_field setted as index of the dataframe. |
|
Draws heatmap of y_field over two arbitrary x_fields setted as multi-index of the dataframe. |
|
Draws a 2D scatter plot of two metrics from a melted dataframe. |
|
Draws a scatter plot with heatmap coloring from three metrics. |
Module Contents#
- malet.plot_utils.plot_drawer.ax_draw_curve(ax: matplotlib.axes.Axes, df: pandas.DataFrame, label: str, annotate=True, annotate_field=[], std_plot: Literal['none', 'fill', 'bar'] = 'fill', unif_xticks=False, color='orange', linewidth=4, marker='D', markersize=10, markevery=20, linestyle='-', **_) matplotlib.axes.Axes[source]#
Draws curve of y_field over arbitrary x_field setted as index of the dataframe. If there is column ‘y_field_sdv’ is in dataframe, draws in errorbar or fill_between depending on
sdv_bar_plot
- malet.plot_utils.plot_drawer.ax_draw_best_stared_curve(ax: matplotlib.axes.Axes, df: pandas.DataFrame, label: str, annotate=True, annotate_field=[], std_plot: Literal['none', 'fill', 'bar'] = 'fill', best_at_max=True, unif_xticks=False, color='orange', linewidth=4, marker='D', markersize=10, markevery=20, linestyle='-', **_) matplotlib.axes.Axes[source]#
Draws curve of y_field over arbitrary x_field setted as index of the dataframe. If there is column ‘y_field_sdv’ is in dataframe, draws in errorbar or fill_between depending on
sdv_bar_plot
- malet.plot_utils.plot_drawer.ax_draw_bar(ax: matplotlib.axes.Axes, df: pandas.DataFrame, label: str, annotate=True, annotate_field=[], std_plot=True, unif_xticks=False, color='orange', **_) matplotlib.axes.Axes[source]#
Draws bar graph of y_field over arbitrary x_field setted as index of the dataframe. If there is column ‘y_field_sdv’ is in dataframe, draws in errorbar or fill_between depending on
sdv_bar_plot
- malet.plot_utils.plot_drawer.ax_draw_heatmap(ax: matplotlib.axes.Axes, df: pandas.DataFrame, cmap='magma', annotate=True, annotate_field=[], norm=None, **_) matplotlib.axes.Axes[source]#
Draws heatmap of y_field over two arbitrary x_fields setted as multi-index of the dataframe.
- malet.plot_utils.plot_drawer.ax_draw_scatter(ax: matplotlib.axes.Axes, df: pandas.DataFrame, y_fields: list, color='orange', marker='D', markersize=30, **_) matplotlib.axes.Axes[source]#
Draws a 2D scatter plot of two metrics from a melted dataframe.
- Parameters:
ax – Matplotlib axes to draw on.
df – DataFrame with a ‘metric’ level in the index and ‘metric_value’ column.
y_fields – List of exactly two metric names to plot as x and y axes.
color – Marker face color.
marker – Marker style.
markersize – Base marker size (scaled by 20x internally).
- Returns:
List of matplotlib artist objects created.
- Return type:
list
- malet.plot_utils.plot_drawer.ax_draw_scatter_heat(ax: matplotlib.axes.Axes, df: pandas.DataFrame, y_fields: list, cmap='magma', marker='D', markersize=30, norm=None, **_) matplotlib.axes.Axes[source]#
Draws a scatter plot with heatmap coloring from three metrics.
The first two metrics are used as x and y coordinates, and the third metric determines the color of each point.
- Parameters:
ax – Matplotlib axes to draw on.
df – DataFrame with a ‘metric’ level in the index and ‘metric_value’ column.
y_fields – List of exactly three metric names (x, y, color).
cmap – Colormap name for the heatmap coloring.
marker – Marker style.
markersize – Base marker size (scaled by 20x internally).
norm – Matplotlib normalization instance for color mapping.
- Returns:
List of matplotlib artist objects created.
- Return type:
list