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

aspect argument to FacetGrid uses the opposite convention from matplotlib #746

Closed
shoyer opened this Issue Oct 30, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@shoyer
Copy link
Contributor

shoyer commented Oct 30, 2015

This is somewhat unfortunate. I'm not entirely sure what we should do about it, though.

matplotlib

plt.imshow([[0]], aspect=2)

image

or

plt.plot()
plt.gca().set_aspect(2)

image

seaborn

sns.FacetGrid({}, aspect=2)

image

@mwaskom

This comment has been minimized.

Copy link
Owner

mwaskom commented Oct 31, 2015

Eek. Is the matplotlib aspect in figure or data coordinates, by the way?

@shoyer

This comment has been minimized.

Copy link
Contributor

shoyer commented Oct 31, 2015

It's an axis level setting so I think it has to be data coordinates. (Which I think is the intent with FacetGrid, but not exactly the case due to matplotlib's messiness.)

On Fri, Oct 30, 2015 at 5:19 PM, Michael Waskom notifications@github.com
wrote:

Eek. Is the matplotlib aspect in figure or data coordinates, by the way?

Reply to this email directly or view it on GitHub:
#746 (comment)

@mwaskom

This comment has been minimized.

Copy link
Owner

mwaskom commented Oct 31, 2015

No, the FacetGrid aspect is just size of the thing in inches, it's invariant to the scale of the data being plotted. So at least they are doing different things?

@mwaskom

This comment has been minimized.

Copy link
Owner

mwaskom commented Oct 31, 2015

FWIW I think the implementation in seaborn is "correct", assuming people correctly interpret aspect=a as giving an aspect ratio of a:1.

@mwaskom mwaskom closed this Dec 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment