Comments (6)
Thank you very much for your help and fast responses!
from scienceplots.
I can´t reproduce, on Google Colab nor in VS Code. Can you provide your code editor? And do you mind double checking the output on a whole new and clean project/notebook?
It only comes to my mind that your environment sets matplotlib to use a style that by default.
Btw, try updating matplotlib and the ipython kernels.
EDIT: can you show the output without any styles applied?
from scienceplots.
Hi, yes something is odd, without any styles I get this: https://imgur.com/a/Wpfwvq6
Which seems the default seaborn template... although I haven't even imported seaborn.
EDIT: I am using kedro as framework and pycharm as editor
from scienceplots.
Two things:
- You can call
mpl.rcParams
orplt.rcParams
and that will throw the dictionary with all config from the applied styles. Unluckily matplotlib does not save your current styles.
Call that from a terminal and from inside PyCharm without making use ofplt.style.use(...)
. That way you can compare both and tell if PyCharm is introducing its styles by default. You may want to use an script to compare those dictionaries. And if you think seaborn matches that, import it with theuse
statement and check. - You can set default values for
rcParams
with:(reference)import matplotlib as mpl mpl.rcParams.update(mpl.rcParamsDefault)
If you find something or this works, pls, let us know!
from scienceplots.
Apparently PyCharm does introduce an style, I have it almost working, what I done is I first set the default config of matplotlib, then the science style, and now I get this: https://imgur.com/a/AwHOcFY
So now I am only missing the colors! Hopefully, although after I have more complex plots that may introduce styles since I heavily rely on seaborn... But one step at a time.
from scienceplots.
Nice! I'll close this issue since the main problem has been solved.
science
style does indeed change the default colors via plt.rcParams['axes.prop_cycle']
.
plt.rcParams['axes.prop_cycle'] = plt.rcParamsDefault['axes.prop_cycle']
And see this comment.
from scienceplots.
Related Issues (20)
- [Help Request]: "No pages of output" issue HOT 5
- [Feature] siunitx mplstyle HOT 3
- [Bug]: Add SciencePlots to Matplotlib third party library list
- [Bug]: weird incompatibility between logging module, matplotlib, and Latex HOT 3
- [Help Request]: color reuse HOT 2
- [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 HOT 3
- Can't line break with \n in ax.set_ylabel. HOT 4
- Using widgets is laggy with SciencePlots HOT 11
- How can I ensure that my figure size is consistent with the "figsize" passed in plt.subplot? HOT 3
- How can I ensure that my figure size is consistent with the "figsize" passed in plt.subplot? HOT 2
- Cannot show the percent sign in figure HOT 2
- Is it possible to get a style for subplots? HOT 3
- `ax.xaxis.set_major_locator` will let matplotlib to throw error. HOT 9
- Greater symbol is not displayed correctly. HOT 1
- Scienceplots
- [Bug]: Rendering bug with no-latex HOT 1
- [Bug]: Wiki images broken HOT 2
- [Help Request]: Bold x-y ticks HOT 1
- How to implement a two-column chart HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scienceplots.