Closed dhakalnirajan closed 1 year ago
You don't have to reload the styles library. Remove plt.style.reload_library()
.
In the older versions, that was needed as SciencePlots copied the styles into Matplotlib default styles folder. After copying them you had to tell Matplotlib to update its styles. With the new version, importing SciencePlots registers new styles from the package folder, so if the library is reloaded after the import matplotlib
statement, Matplotlib 'forgets' the SciencePlots ones.
Anyways, is that code from an example you found in current docs? I may have missed to update something.
Hi @echedey-ls !
I tried the latest commit way using the code
!pip install git+https://github.com/garrettj403/SciencePlots
import scienceplots
import matplotlib.pyplot as plt
plt.style.use(['science', 'notebook', 'ieee'])
It worked.
Thanks!
If anyone is facing the error, you need to remove:
plt.style.reload_library()
if you have this code snippet as mpl removes the style from scienceplots library.
Hi!
I loved using SciencePlots and I came back to Python after learning C, and many thanks for helping other folks out and me with the project!
I was using v 2.0.1 in Google Colab, and I cannot use the
science
style.I did the following:
And the generated error was the following:
How can I work on that issue?
Thanks!