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

related projects #22

Closed
arsenovic opened this issue Dec 1, 2013 · 7 comments
Closed

related projects #22

arsenovic opened this issue Dec 1, 2013 · 7 comments

Comments

@arsenovic
Copy link

this project is great, and the aesthetics are thoughtfully designed. i love it. it would be nice for these style-improvements to be incorporated into mpl.

also, if you aren't already aware, tony yu is working on a similar project
https://github.com/tonysyu/mpltools

he recently implemented the styles feature into mpl
matplotlib/matplotlib#2236

@arsenovic
Copy link
Author

possibly a lot of your rcmod.py could be implemented as style sheets.

https://github.com/matplotlib/matplotlib/tree/master/lib/matplotlib/style/stylelib

@mwaskom
Copy link
Owner

mwaskom commented Dec 1, 2013

Yeah, I was thinking about that recently. The one thing is that I'm not sure how stylesheets would handle the context-dependent aspects of the seaborn styles? I actually think the implementation of this in seaborn.rcmod is extremely janky, but I haven't thought of a better way. Maybe I could write some stylesheet templates and then plug in values based on the context and send those to the mpl style system?

@arsenovic
Copy link
Author

i assume you are referring to the palette_context function? i actually didnt notice this feature until you mentioned it. it seems like the mpl styles could be swapped out in an identical way as seaborn color palettes . i think that its a great idea, and i would use it. perhaps @tonysyu could provide some advice on this?

@mwaskom
Copy link
Owner

mwaskom commented Dec 1, 2013

Ah, no, but reasonable confusion. The "context" parameter in seaborn.set() doesn't mean context in the sense of a context manager (like palette_context), but in terms of setting the aesthetics to have the same general look but with features tweaked for figures intended to end up in an interactive notebook vs. slides for a talk, an academic paper, etc: http://stanford.edu/~mwaskom/software/seaborn/aesthetics.html#changing-style-contexts

@arsenovic
Copy link
Author

ok, i see. so.... my understanding is that your contexts are exactly what tony calls styles.?
maybe ill pull the current maplotlib and try to add a *.mplstyle similar to seaborn.
in either case, i think using python's context manager (like you did with palette_context) would allow this to be tweaked from kwargs on-the-fly .

@arsenovic
Copy link
Author

ok, i started making a style file, and see why it may be tricky; the effects of changing the style and context, are not totally independent, (but mostly are)

if they were totally independent, the different styles and contexts could be done with several .mplstyles that are loaded in series. however given the slight inter-mixing, you would have to have separate .mplstyles for each combination of context and style to retain current functionality.

inserting the .mplstyle functionality in between the steps of creating and applying these mpl rc-settings can be done, basically creating a seaborn_mplstyle_generator() function. but i dont see huge benefit, except that they could be saved to disk, and you could re-use the mpl context manager function.

@mwaskom
Copy link
Owner

mwaskom commented Dec 7, 2013

Yep, that's where the problems are.

I expect the style implementation to change (and hopefully stabilize) a bit over the next release or two. It might be better to revisit this then.

@mwaskom mwaskom closed this as completed Dec 12, 2013
@mwaskom mwaskom mentioned this issue Dec 18, 2013
3 tasks
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

No branches or pull requests

2 participants