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

solarized dark custom style sheet #17325

Closed
wants to merge 2 commits into from
Closed

solarized dark custom style sheet #17325

wants to merge 2 commits into from

Conversation

gennaro-tedesco
Copy link

I would like to propose a custom style sheet in line with the solarized dark colour palette. The style mirrors the ones already present and is the only addition to this pull request.

@story645
Copy link
Member

story645 commented May 4, 2020

Hi can you please provide an example of the new stylesheet and explain why it's worth adopting?

@timhoffm
Copy link
Member

timhoffm commented May 4, 2020

The solarized palette comes in light and dark flavor.

We currently have a solarized light style but not a dark correspondent. It makes sense to add the dark style as well.

My concern is that the dark and light style should be the same except for the colors. Currently, there are differences with:

  • figure.frameon
  • figure.edgecolor
  • axes.grid
  • grid.color

Not sure why the light style is called "Solarize_Light2". That's odd in multiple ways:

  • All other styles are lowercase
  • It's called "solarize" whereas the theme is "solarized"
  • No idea why 2. At least now, we don't have another solarize style.

@@ -0,0 +1,30 @@
## FIGURE
figure.facecolor : 002b36
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use spaces, not tabs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@gennaro-tedesco
Copy link
Author

My concern is that the dark and light style should be the same except for the colors. Currently, there are differences with:

I could mirror the current light theme if you believe this is the standard we have to follow, only changing the corresponding colour cycles and palettes. I could wait for your decision on the topic and make the changes accordingly.

@gennaro-tedesco
Copy link
Author

Moreover, find below a small collection of examples of what this theme looks like, obtained by using seaborn functionalities as shown here or here

import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
plt.style.use('solarized_dark')
x = np.random.normal(0, 1, size=30)
sns.kdeplot(x)
sns.kdeplot(x, bw=.2, label="bw: 0.2")
sns.kdeplot(x, bw=2, label="bw: 2")
plt.legend()
plt.show()

Screenshot 2020-05-05 at 08 49 24

tips = sns.load_dataset("tips")
sns.catplot(x="sex", y="total_bill",
                hue="smoker", col="time",
                data=tips, kind="bar",
                height=4, aspect=.7)
plt.show()

Screenshot 2020-05-05 at 08 53 00

import pandas as pd 
index = pd.date_range("1 1 2000", periods=100,
                    freq="m", name="date")

data = np.random.randn(100, 4).cumsum(axis=0)
wide_df = pd.DataFrame(data, index, ["a", "b", "c", "d"])
sns.lineplot(data=wide_df)
plt.show()

Screenshot 2020-05-05 at 08 55 28

@QuLogic
Copy link
Member

QuLogic commented May 5, 2020

I think if we have light, we should also have a dark variant, but they should be consistent in what they change.

I never understood the naming of our light Solarized theme, and no-one answered when I asked. I think we should add a new one with more consistent name (and whatever consistencies we need with a dark variant) and (soft?-)deprecate the old one.

@gennaro-tedesco
Copy link
Author

I never understood the naming of our light Solarized theme, and no-one answered when I asked. I think we should add a new one with more consistent name (and whatever consistencies we need with a dark variant) and (soft?-)deprecate the old one.

If you think the current proposal for the dark theme satisfies the requirements I could create the equivalent for the light version, so that the two mirror each other except for the actual colour palettes.

@jklymak
Copy link
Member

jklymak commented Apr 23, 2021

This fell off everyone's radar, but I think would be a useful addition...

@jklymak jklymak marked this pull request as draft April 23, 2021 15:18
@tacaswell tacaswell deleted the branch matplotlib:master October 20, 2021 19:53
@tacaswell tacaswell closed this Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants