Holger Frey
8395eb71f1
|
4 years ago | |
---|---|---|
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
compile.py | 4 years ago | |
cpi.mplstyle | 4 years ago | |
custom cpi styles.txt | 4 years ago | |
default.mplstyle | 4 years ago | |
test_data.pkl | 4 years ago |
README.md
CPI matplotlib plotting style
This library provides a custom plotting style for matplotlib and other libraries building on matplotlib like pandas or seaborn.
The plotting style is set to aproximately the styles described in [our wiki], more precicely in this PowerPoint presentation.
how to use it
copy the file cpi.mplstyle
into the directory with your analysis and tell
matplotlib to use this style:
usage with matplotlib / pyplot:
from matplotlib import pyplot pyplot.style.use('./cpi.mplstyle') usage with other libraries based on matplotlib, like searborn: from matplotlib import pyplot import seaborn pyplot.style.use('./cpi.mplstyle')
be aware that the set* functions of seaborn (like set_theme) might mess with the matplotlib style.
to use the seaborn.set_palette() function to change line colors seems to be fine to use this style as your default matplotlib style, have a look at https://matplotlib.org/stable/tutorials/introductory/customizing.html#customizing-with-matplotlibrc-files