chemparseplot.plot.theme#

Plotting themes and colormap utilities.

Added in version 0.1.0.

Module Contents#

Classes#

PlotTheme

Holds all aesthetic parameters for a matplotlib theme.

Functions#

build_cmap

Build and register a LinearSegmentedColormap from a list of hex colors.

setup_global_theme

Sets global plt.rcParams based on the theme.

apply_axis_theme

Applies theme properties specific to an axis instance.

setup_publication_theme

Extended theme setup for publication-quality figures.

get_theme

Retrieves a theme by name and applies optional property overrides.

Data#

API#

chemparseplot.plot.theme.log#

‘getLogger(…)’

chemparseplot.plot.theme.RUHI_COLORS#

None

class chemparseplot.plot.theme.PlotTheme#

Holds all aesthetic parameters for a matplotlib theme.

Added in version 0.1.0.

name: str#

None

font_family: str#

None

font_size: int#

None

facecolor: str#

None

textcolor: str#

None

edgecolor: str#

None

gridcolor: str#

None

cmap_profile: str#

None

cmap_landscape: str#

None

highlight_color: str#

None

chemparseplot.plot.theme.BATLOW_THEME#

‘PlotTheme(…)’

chemparseplot.plot.theme.RUHI_THEME#

‘PlotTheme(…)’

chemparseplot.plot.theme.THEMES#

None

chemparseplot.plot.theme.build_cmap(hex_list, name)#

Build and register a LinearSegmentedColormap from a list of hex colors.

Added in version 0.1.0.

chemparseplot.plot.theme.setup_global_theme(theme: chemparseplot.plot.theme.PlotTheme)#

Sets global plt.rcParams based on the theme.

Added in version 0.1.0.

chemparseplot.plot.theme.apply_axis_theme(ax: matplotlib.pyplot.Axes, theme: chemparseplot.plot.theme.PlotTheme)#

Applies theme properties specific to an axis instance.

Added in version 0.1.0.

chemparseplot.plot.theme.setup_publication_theme(theme: chemparseplot.plot.theme.PlotTheme)#

Extended theme setup for publication-quality figures.

Calls setup_global_theme and adds line widths, spine removal, DPI, and tight bounding box defaults.

Added in version 1.3.0.

chemparseplot.plot.theme.get_theme(name: str, **overrides) chemparseplot.plot.theme.PlotTheme#

Retrieves a theme by name and applies optional property overrides.

Added in version 0.1.0.