simplebench.reporters.graph.matplotlib.theme.base module🔗

MatPlotLib Theme implementation.

Provides a base class for MatPlotLib themes used in SimpleBench graphs.

class simplebench.reporters.graph.matplotlib.theme.base.Theme(
rcparams: dict[str, Any] | None = None,
)[source]🔗

Bases: RcParams

An immutable MatPlotLib base theme class for the graphs.

This is a subclass of matplotlib.RcParams that represents a theme for Matplotlib graphs. It can be used to define custom styles for Matplotlib graphs generated by SimpleBench.

See Customizing Matplotlib with style sheets and rcParams for more information on customizing Matplotlib themes.

Initialize a Theme instance.

Parameters:

rcparams (dict[str, Any] | None) – The rcParams to use for the theme. If None, the default Matplotlib rcParams will be used.

replace(
rcparams: dict[str, Any],
) Theme[source]🔗

Replace some parameters in the theme and return a new Theme instance without modifying the current instance.

new_theme = old_theme.replace({'axes.grid': False, 'figure.dpi': 200})
Parameters:

rcparams (dict[str, Any]) – The new rcParams to use for the theme.

Returns:

A new Theme instance with the updated rcParams.

Return type:

Theme