simplebench.reporters.graph.matplotlib.theme package🔗

Themes for Matplotlib graphs.

It consists of the base Theme class and instances of defined themes.

Custom themes can be created either by creating Theme instances directly or by using the .replace() method of existing Theme instances to override specific rcParams.

class simplebench.reporters.graph.matplotlib.theme.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

Submodules🔗