campmc.pl.metric_lines#
- campmc.pl.metric_lines(df, out_png=None, *, x_col, y_col, hue_col=None, title='Metric', show=False)[source]#
Save or display a line plot of a metric from a tidy DataFrame.
- Parameters:
- df
DataFrame Tidy table of metric values.
- out_png
str|Path|None(default:None) If set, write the figure to this path (PNG).
- x_col
str Column for the x-axis.
- y_col
str Column for the y-axis.
- hue_col
str|None(default:None) Optional grouping column (separate lines).
- title
str(default:'Metric') Plot title.
- show
bool(default:False) If
True, display viaplt.show()and returnNone.
- df
- Return type:
Figure|None- Returns:
The figure when
showis false andout_pngis not set; otherwiseNoneafter saving or displaying.
Examples