pl.style

pl.style(rl=1.1)

A matplotlib style context approximating theme_spiDE (R theme_spiDE).

A black panel border (all four spines), no grid, black axis ticks, no top / right ticks, text sizes scaled by rl against a base of 11 pt as ggplot2’s theme_minimal does. Use it as with spidepy.pl.style(): ... around your own plotting code. Boxed facet strips and italic legend titles are drawn by the spiDE plots themselves (matplotlib has no rcParams for them).

Parameters

Name Type Description Default
rl float A positive number: the text size relative to a base of 11 pt. 1.1

Yields

Name Type Description
None The matplotlib rc parameters are restored on exit.

See Also

spide_colours : The colours the spiDE plots use.

Examples

import matplotlib.pyplot as plt
from spidepy.pl import style
with style(rl=1.0):
    fig, ax = plt.subplots()
    _ = ax.plot([0, 1], [0, 1])
    size = plt.rcParams["font.size"]
size
11.0

fig