BaseExperiment.plot#
- BaseExperiment.plot(*args, show=True, legend_kwargs=None, **kwargs)[source]#
Plot the model.
Internally, this function dispatches to either _bayesian_plot or _ols_plot depending on the model type.
- Parameters:
show (
bool) – Whether to automatically display the plot. Defaults to True. Set to False if you want to modify the figure before displaying it.legend_kwargs (
dict[str,Any] |None) –Keyword arguments to adjust legend placement and styling. The existing legend is modified in place so that custom handles (e.g.
(Line2D, PolyCollection)tuples) are fully preserved.Supported keys:
loc,bbox_to_anchor,fontsize,frameon,title.bbox_transformis accepted alongsidebbox_to_anchor.args (Any)
kwargs (Any)
- Return type:
Examples
Move the legend outside the plot area to avoid overlap:
>>> fig, ax = result.plot( ... show=False, ... legend_kwargs={"loc": "upper left", "bbox_to_anchor": (1.04, 1)}, ... )