matplotlib/matplotlib — pull request #2236 by tonysyu (2013-07-21 07:11:48+00:00)
Title: Add easy style sheet selection

Add easy switching between rcParams based on the implementation in [mpltools.style](http://tonysyu.github.io/mpltools/auto_examples/index.html#style-package). Basically, just call

```python
from matplotlib import style
style.use('ggplot')
```
... to switch to a style sheet that sort of mimics ggplot's style.

Notes:
- In the current implementation, shipped style files are stored in `matplotlib/style/stylelib` and user files are stored in `~/.matplotlib/stylelib`.
- I chose `*.mplrc` as an extension for the style files, but I'm fine with changing that.
- Ideally there would an rc parameter (or some other mechanism) to easily add search paths for style files
- One thing I liked in the original implementation was the ability to chain style sheets, with each style sheet adding the parameters they set. The current implementation doesn't work like this because `rc_params_from_file` initializes the default `rcParams` and then updates the defaults from the file. Thus, updating using the result from `rc_params_from_file` will overwrite all values.