shamrock.utils.plot.benchmark.make_std_bench_plot#
- shamrock.utils.plot.benchmark.make_std_bench_plot(plot_data, xlabel, ylabel, title, end_label_fmt=<function <lambda>>, before_plot_func=None, dpi=250, figsize=(8, 6), min_gap_px=75, legend_ncol=2)#
Build a standardized benchmark plot.
Layout: a log-log plot on the left (5/6 of the width), a value-callout panel on the right (1/6), and a legend row spanning the full width underneath.
Parameters#
- plot_datadict
Maps a series key to a dict with keys
x,y,color,label,linestyleandmarker, one entry per line to plot.- xlabel, ylabel, titlestr
Axis labels and title for the main plot.
- end_label_fmtcallable, optional
Formats a series’ last y-value into its callout text.
- before_plot_funccallable, optional
Called as
before_plot_func(ax_main)before the series in plot_data are plotted, e.g. to draw reference lines underneath them.- dpi, figsizeoptional
Passed to matplotlib.pyplot.figure.
- min_gap_pxfloat, optional
Minimum vertical spacing between callouts, in display pixels; see add_end_labels.
- legend_ncolint, optional
Number of columns in the legend row.
Returns#
- (matplotlib.figure.Figure, matplotlib.axes.Axes)
The created figure and its main (plot) axes.