Styles¶
We've created a set of default plotting styles that can be called via artlo.plot.set_style()
, which updates the matplotlib.rcParams
dictionary. You can find the relevant code documentation here.
Important artlo
must be imported before matplotlib
for these functions to work - this is stupd and annoying, and driven by the order in which different environment variables are set. To get around this, you can directly import important matplotlib classes from artlo
:
import artlo
from artlo import mpl # matplotlib module
from artlo import plt # matplotlib.pyplot
artlo.plot.set_style('salo-dark')
plt.plot(...)
salo-dark¶
artlo.plot.set_style('salo-dark')
salo-light¶
artlo.plot.set_style('salo-light')
cfo-light¶
artlo.plot.set_style('cfo-light')
For reference, here is the default matplotlib
plotting style:
Code documentation¶
Lists the available plotting styles.
Returns:
Name | Type | Description |
---|---|---|
styles | list of style names to pass to |
Source code in artlo/plot.py
35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
Sets a series of plot style parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
style |
str of the style name to use. from |
required |
Returns:
Type | Description |
---|---|
None. Updates matplotlib.rcParams |
Source code in artlo/plot.py
22 23 24 25 26 27 28 29 30 31 32 |
|