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
Simple way to set figsize for ANY plot #112
Comments
Any reason you don't want to do |
I see, so like Does this kind of thing work properly in a That's not too bad, but it just feels like sns.set() should have a figsize keyword instead of always defaulting to the hard-coded value it uses now. I can understand your reluctance to duplicate functionality all over the place, though. It's mainly about having something that is easy to remember without needing to google it each time you want to quickly change the size. |
Sure you could use matplotlib's provided Though I'm not sure I see much advantage to that over just defining a figure with a specific figuresize if you want a unique deviation from the default. |
hmm.. so now that I know it exists I suppose I could use an rc_context and directly modify the rc parameters for this kind of stuff, but what I love about seaborn is that it simplifies and streamline things like setting RC parameters or using the rc_context so I don't need to figure out and memorize the syntax for all of that machinery. Seeing "figsize" pop up as a keyword in I'm sure you're quite familiar with all of that now, but I'm sure there are a lot of people for whom the guts of matplotlib are pretty opaque (myself included). For this example, how did you even know that you needed to use I don't think it's too unreasonable to provide a simplified interface to some of the more common rc parameters, but anyways that's enough complaining from me =) |
Well, I take this as a mostly rhetorical question, but if your'e curious the first argument is a group from the rc parameters and the keyword arguments are parameter/value mappings. To see the current rc parameters you can do |
I do take your point that the matplotlib documentation could be improved substantially, and it's something they're working on. |
I think this might be somewhat related to #74 as well: As you mentioned, matplotlib has a lot of different ways of doing the same thing, which creates confusion. I am 100% for a consistent, pythonic way of setting RC parameters, and I understand if this specific request doesn't yet fit with whatever future structure you may be planning for that. |
Yeah, I'm keeping this open for now as I will address it in some way in the branch that #74 is about. |
I often find myself doing some quick-and-dirty plotting, and wishing there was a simple, one-step, easy-to-remember way to set the default figsize for all matplotlib plots.
I imagine something very light-weight like
sns.set(figsize=(2, 4))
orsns.set_figsize(2, 4)
.iPython actually has this already as
IPython.core.pylabtools.figsize(sizex, sizey)
.I can submit a pull request pretty easily, but I wanted to ask you opinion first.
The text was updated successfully, but these errors were encountered: