olgabot / prettyplotlib

Painlessly create beautiful matplotlib plots.
olgabot.github.io/prettyplotlib
MIT License
1.69k stars 148 forks source link

Fix examples to use pretty context manager #71

Closed stahlous closed 10 years ago

stahlous commented 10 years ago

The current examples don't use the pretty context manager, so they don't pickup the correct colors as seen in issue #52.

williampw commented 10 years ago

Why not change the definition of prettyplotlib.general.subplots and prettyplotlib.general.subplot2grid to include the new context manager? Not having to explicitly call the context manager would probably make it easier to use the functions.

stahlous commented 10 years ago

Because in the examples the Axes object is explicitly passed, and if that is created in a different context, it will not pickup the correct colors. I think a more comprehensive solution is needed for this problem ultimately, but it would be nice to have the examples at least working for newcomers in the meantime.