The easiest way to install SciencePlots is by using pip:
# to install the latest release (from PyPI)
pip install SciencePlots
# to install the latest release (using Conda)
conda install -c conda-forge scienceplots
# to install the latest commit (from GitHub)
pip install git+https://github.com/garrettj403/SciencePlots
# to clone and install from a local copy
git clone https://github.com/garrettj403/SciencePlots.git
cd SciencePlots
pip install -e .
From version v1.1.0 on, import scienceplots is needed on top of your scripts so Matplotlib can make use of the styles.
Please see the FAQ for more information and troubleshooting.
Using the Styles
"science" is the primary style in this repo. Whenever you want to use it, simply add the following to the top of your python script:
import matplotlib.pyplot as plt
import scienceplots
plt.style.use('science')
You can also combine multiple styles together by:
plt.style.use(['science','ieee'])
In this case, the ieee style will override some of the parameters from the science style in order to configure the plot for IEEE papers (column width, fontsizes, etc.).
To use any of the styles temporarily, you can use:
with plt.style.context('science'):
plt.figure()
plt.plot(x, y)
plt.show()
Examples
The basic science style is shown below:
It can be cascaded with other styles to fine-tune the appearance. For example, the science + notebook styles (intended for Jupyter notebooks):
Please see the project Wiki for a full list of available styles.
Specific Styles for Academic Journals
The science + ieee styles for IEEE papers:
IEEE requires figures to be readable when printed in black and white. The ieee style also sets the figure width to fit within one column of an IEEE paper.
Example: Traditional Chinese (science + no-latex + cjk-tc-font):
See the FAQ for information on installing CJK fonts.
Other color cycles
SciencePlots comes with a variety of different color cycles. For a full list, see the project Wiki. Two examples are shown below.
The bright color cycle (color blind safe):
The high-vis color cycle:
Paul Tol's discrete rainbow color sets are available as well, with the style identifier discrete-rainbow-<n>, where <n> is the number of unique colors. <n> ranges from 1 to 23 (inclusive). For example, discrete-rainbow-15:
Help and Contributing
Please feel free to contribute to the SciencePlots repo! For example, it would be good to add new styles for different journals and add new color cycles. Before starting a new style or making any changes, please create an issue through the GitHub issue tracker. That way we can discuss if the changes are necessary and the best approach.
If you need any help with SciencePlots, 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.
Keçeci, Mehmet. "Scalable Complexity: Mathematical Analysis and Potential for Physical Applications of the Keçeci Circle Fractal", 13 May 2025. https://doi.org/10.5281/zenodo.15396198. (Reference has been made to the module "SciencePlots".)