garrettj403/SciencePlots

OSError starting with SciencePlots==2.0.0

Tobias-Fischer opened this issue · 2 comments

Hiya,

I love using SciencePlots, many thanks for the project!

On a fresh install, however, I cannot use the science style:

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/fischert/mambaforge/envs/DECRA/lib/python3.10/site-packages/matplotlib/style/core.py", line 162, in use
    raise IOError(
OSError: 'science' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles

It works fine for version 1.0.9 though. Any clues?

Thanks!

Hi @Tobias-Fischer

We recently changed how the package is installed. You now need to add import scienceplots to the top of your file (before plt.style.use....

Does that work for you?

Awesome, thanks!