Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 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 #108

Closed
Hongru0306 opened this issue Jan 3, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Hongru0306
Copy link

Hongru0306 commented Jan 3, 2024

Environment

System: Windows-10-10.0.19041-SP0
Python: 3.8.16 (default, Jan 17 2023, 22:25:28) [MSC v.1916 64 bit (AMD64)]
SciencePlots: 2.1.1
Matplotlib: 3.5.1
Latex distro: (populate manually)

Describe the issue here

I'm sorry to bother you.
This bug is really crushing me, I don't know why the official repo can't be made to work with a few lines of guidance from the readme, but instead requires a lot of debugging and trial and error.
Besides, why don't you just add science inside available, instead of letting the user go through constant trial and error?

plt.style.available  
['Solarize_Light2',
 '_classic_test_patch',
 '_mpl-gallery',
 '_mpl-gallery-nogrid',
 'bmh',
 'classic',
 'dark_background',
 'fast',
 'fivethirtyeight',
 'ggplot',
 'grayscale',
 'seaborn',
 'seaborn-bright',
 'seaborn-colorblind',
 'seaborn-dark',
 'seaborn-dark-palette',
 'seaborn-darkgrid',
 'seaborn-deep',
 'seaborn-muted',
 'seaborn-notebook',
 'seaborn-paper',
 'seaborn-pastel',
 'seaborn-poster',
 'seaborn-talk',
 'seaborn-ticks',
 'seaborn-white',
 'seaborn-whitegrid',
 'tableau-colorblind10']

How can we reproduce it? What have you tried?

I've tried so many, including various latex reporting errors. Now that I've got latex installed, I still can't draw with the science class inside the readme, the other classes inside available do.

Extra info

No response

@Hongru0306 Hongru0306 added the bug Something isn't working label Jan 3, 2024
@Hongru0306
Copy link
Author

I have worked it on Linux, sorry to bother you!

@flyingtiger111
Copy link

I'm experiencing the same problem.
May I ask how you solved it

@echedey-ls
Copy link
Collaborator

I'm experiencing the same problem.
May I ask how you solved it

@flyingtiger111

You need to install the package, in the environment you are using (if using a virtualenv make sure to activate it)

Then import the package
import scienceplots on top of the script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants