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

Add Seaborn style sheets; addresses #4566 #4570

Merged
merged 2 commits into from
Jul 5, 2015

Conversation

petebachant
Copy link
Contributor

This commit adds the default Seaborn "darkgrid" style to the style library.

@efiring
Copy link
Member

efiring commented Jun 30, 2015

Thanks for doing this.
In anticipation of additional Seaborn styles being added, should the file name include some indication of the particular variant?
Maybe we need some more thought about how to categorize, organize, and name styles.

@tacaswell tacaswell added this to the next point release milestone Jun 30, 2015
@petebachant
Copy link
Contributor Author

I was thinking of calling this one simply seaborn since it is the default style when importing seaborn, then adding seaborn-white, seaborn-whitegrid, and seaborn-ticks.

@efiring
Copy link
Member

efiring commented Jun 30, 2015

Attn @mwaskom: comments?

@mwaskom
Copy link

mwaskom commented Jun 30, 2015

I would prefer the current default seaborn style to be called seaborn-darkgrid (or however you choose to indicate the variant).

Do matplotlib stylesheets have any facility for handling style and element scale ("context" in seaborn, regrettably) independently?

@WeatherGod
Copy link
Member

There is MEP26 that is being ironed out, if that is what you are thinking?
http://matplotlib.org/devdocs/devel/MEP/MEP26.html

On Tue, Jun 30, 2015 at 3:59 PM, Michael Waskom notifications@github.com
wrote:

I would prefer the current default seaborn style to be called
seaborn-darkgrid (or however you choose to indicate the variant).

Do matplotlib stylesheets have any facility for handling style and element
scale ("context" in seaborn, regrettably) independently?


Reply to this email directly or view it on GitHub
#4570 (comment)
.

@mwaskom
Copy link

mwaskom commented Jun 30, 2015

I just mean that the "seaborn styles" are really the product of two independent sets of rc parameters.

@petebachant
Copy link
Contributor Author

The scaling and colors could be split into two different stylesheets, which would allow users to

plt.style.use("seaborn-darkgrid")
plt.style.use("seaborn-paper")

@mwaskom
Copy link

mwaskom commented Jun 30, 2015

Actually good point, you also need a third piece: the color cycle palette.

@tacaswell
Copy link
Member

Would it be worth adopting the scale style sheets wholesale so

plt.style.use('seaborn-darkgrid")
plt.style.use("media-paper")
# plt.style.use("media-interactive")
# plt.style.use("media-talk")

?

The color cycle might be complicated / should embrace #4258 (which needs to be replaced by a PR to add https://github.com/tacaswell/cycler (which needs to end up on pypi and move to the mpl org) ).

@mwaskom
Copy link

mwaskom commented Jun 30, 2015

I don't think seaborn does anything as complicated as your cycler tool, it just sets the color cycle independently from the axes style and plotting context.

@tacaswell
Copy link
Member

Right, leave cycler out of this.

@petebachant Can you split the style sheet up as discussed (base axes settings, font/tick sizes, color cycle)?

There is a PR in to use styles in styles (#4240 ) which can be used to create composite style sheets if we want that as well.

@petebachant
Copy link
Contributor Author

Sure, I will split the style sheets up.

@petebachant petebachant changed the title Add Seaborn stylesheet; addresses #4566 Add Seaborn style sheets; addresses #4566 Jul 4, 2015
@petebachant
Copy link
Contributor Author

Just split the darkgrid style into three sheets for the scaling, colors, and palette. What do you guys think? Should I make the other Seaborn variants?

@tacaswell
Copy link
Member

👍 to both this and the other variants.

@tacaswell
Copy link
Member

@petebachant I am going to merge this as-is, can you make a new PR with the other variants ?

tacaswell added a commit that referenced this pull request Jul 5, 2015
ENH: Add Seaborn style sheets

closes #4566
@tacaswell tacaswell merged commit 0bbd127 into matplotlib:master Jul 5, 2015
@petebachant
Copy link
Contributor Author

Will do!

@petebachant petebachant deleted the seaborn_style branch July 7, 2015 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants