settings
settings
Define options for Starsim. All options should be set using set() or directly, e.g.:
ss.options(verbose=False)
Functions
Name | Description |
---|---|
style | Set the style in a with block. |
style
=None, **kwargs) settings.style(style
Set the style in a with block.
Note: Starsim comes bundled with three fonts: Mulish (default), Raleway, and Rosario. Use font='sans-serif'
to use the Matplotlib default font.
Parameters
Name | Type | Description | Default |
---|---|---|---|
style | str | the style to use; if None, use current; otherwise, ‘starsim’, ‘simple’, ‘fancy’, plus all of the Matplotlib styles are options | None |
**kwargs | dict | passed to sc.options.with_style() |
{} |
Examples::
# Create a plot using default Starsim styling
with ss.style():
plt.plot()
# Create a plot using a built-in Matplotlib style
with ss.style('seaborn-v0_8-whitegrid'):
plt.plot()
# Customize the current style
with ss.style(font='Rosario'):
plt.plot()