-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Change color of sample plots for dark mode #51860
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
Comments
take |
The images are indeed svg. I would indeed just adjust the figures so they work for both dark/light mode |
If the sample plot does not work well with the dark theme, you can try using a different plotting library that is more compatible with dark themes. For example, the |
we can just use the seaborn library for better visualization. I would love to help out on this. |
The illustrations in the getting started section are created in inkscape and stored as svg-images and not created using a plot-library. I do think the easiest way is to update these so they work in both light/dark theme. E.g. also the black arrows in the illustrations are not working in the dark theme. I'm certainly willing to adjust this myself in the coming weeks, but help is certainly. @datapythonista in case it is hard to make illustrations both work in light and dark theme, is there an option/admonition/code-snippet... to provide two images and switch them together with the dark/light switch? |
In theory is supported, but I think someone gave it a try and couldn't get it working. I didn't check the details of the theme, but even if it's using html in the markdown, or a custom directive, I guess shouldn't be difficult to implement. But I think it's doable to have a single image working well for both themes. |
I've checked the pydata-sphinx theme information:
I'll prepare a PR which:
|
xref #50936
There are some sample plots in our getting started docs that don't show properly when the dark theme of our site is enabled:
We should change the colors so it displays correctly in both the light and dark themes. I assume the image is a svg and the best approach is to simply change the colors in it. But maybe it's autogenerated from pandas somehow, and it's better to change at the generation. @stijnvanhoey thoughts on the best approach?
The text was updated successfully, but these errors were encountered: