Matplotlib JOTA style for making figures This repo has Matplotlib JOTA style to format plots and figures for publications and presentation.
The easist way to install jotaviz is to use pip:
# to install the latest release (from PyPI)
pip install jotaviz
# in Ubuntu/Debian
python3 -m pip install jotaviz
# to install latest commit (from GitHub)
pip install git+https://github.com/JOTAJornalismo/jotaviz.git
# to clone and install from a local copy
git clone https://github.com/JOTAJornalismo/jotaviz.git
cd jotaviz
pip install -e .
The pip installation will automatically move all of the Matplotlib style files *.mplstyle
into the appropriate directory on your computer.
Please see the FAQ section for more information and troubleshooting.
"extensys" is the main style from this repo. Whenever you want to use it, simply add the following to the top of your python script:
import matplotlib.pyplot as plt
plt.style.use('jotaviz')
Available styles include:
jotaviz, jotaviz-black, jotaviz-white, jotaviz-glass
To use any of the styles temporarily, you can use:
with plt.style.context(['jotaviz']):
plt.figure()
plt.plot(x, y)
plt.show()
The default format to save figure is .png
with dpi=500
. Other formats by obtained by passing it in the plt.savefig
as well as the dpi
. For example:
plt.savefig("figures/fig1" + ".pdf", dpi=1000)
The jotaviz
style:
The jotaviz-white
style (with markers)
The jotaviz-black
style (with grid)
The extensys
+ dark_background
style
Please feel free to contribute to the jotaviz repo! Before starting a new style or making any changes, please create an issue through the GitHub issue tracker.
If you need any help with jotaviz, please first check the FAQ and search through the previous GitHub issues. If you can't find an answer, create a new issue through the GitHub issue tracker.
You can checkout Matplotlib's documentation for more information on plotting settings.
You don't have to cite jotaviz if you use it but it's nice if you do:
@article{jotaviz,
author = {Daniel Marcelino},
title = {{JOTAJornalismo/jotaviz}},
month = {nov},
year = {2021},
publisher = {},
version = {},
doi = {},
url = {}
}