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

Overhaul style functions #141

Merged
merged 12 commits into from Mar 22, 2014
Merged

Overhaul style functions #141

merged 12 commits into from Mar 22, 2014

Conversation

mwaskom
Copy link
Owner

@mwaskom mwaskom commented Mar 21, 2014

This is a relatively large change to the style machinery. To quote from the release notes:

  • The functions that interact with matplotlib rc parameters have been updated and standardized. There are now three pairs of functions, :func:axes_style and :func:set_style, :func:plotting_context and :func:set_context, and :func:color_palette and :func:set_palette. In each case, the pairs take the exact same arguments. The first function defines and returns the parameters, and the second sets the matplotlib defaults. Additionally, the first function in each pair can be used in a with statement to temporarily change the defaults. Both the style and context functions also now accept a dictionary of matplotlib rc parameters to override the seaborn defaults, and :func:set now also takes a dictionary to update any of the matplotlib defaults. See the :ref:tutorial <aesthetics_tutorial> for more information.
  • The nogrid style has been deprecated and changed to white for more uniformity (i.e. there are now darkgrid, dark, whitegrid, and white styles).

This closes #121, closes #74, and closes #112.

Also @phobson this reverts the addition of the gridweight parameter. Because set() and set_style() accept an rc dict with params to override the seaborn themes, it didn't seem necessary to have the additional layer of complexity where some but not all matplotlib parameters are aliased and get special treatment. Sorry if that breaks some code.

This also standardizes the set of parameters that are part of a seaborn style and a seaborn context (and enforces independence between those groups), which should make it easy to integrate with the stylesheet functionality in matplotlib 1.4 (although to be honest I haven't looked too closely at that stuff).

I also took this opportunity to make some tweaks to the styles, with things like thinner gridlines and replacing black elements with dark gray where appropriate.

Because this required rerunning the test notebooks, this PR also includes a downsizing of the aesthetics and linear model notebooks. I'm keeping them around because a lot of links out there on the internet point at the nbviewer versions, but now they're brief introductions with links to the longer version in the online docs.

@phobson
Copy link
Contributor

phobson commented Mar 21, 2014

Thanks for the heads up. I'm excited to see this merged! And don't worry about killing in the gridweights kwarg. As long an they're thinned by default, I don't need it 👍

@mwaskom mwaskom added this to the v0.3 milestone Mar 21, 2014
@mwaskom mwaskom added style and removed testing labels Mar 21, 2014
@mwaskom
Copy link
Owner Author

mwaskom commented Mar 21, 2014

Cool, I'll let this simmer for a little bit to make sure there's nothing I'm forgetting, in the mean time I've built the docs and put them up at http://stanford.edu/~mwaskom/software/seaborn-dev/index.html if you're interested.

mwaskom added a commit that referenced this pull request Mar 22, 2014
@mwaskom mwaskom merged commit 8e0d4a9 into master Mar 22, 2014
@mwaskom mwaskom deleted the style_overhaul branch March 22, 2014 17:18
olgabot pushed a commit to olgabot/seaborn that referenced this pull request Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants