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

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

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

Comments

@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
Copy link
Owner

mwaskom commented Oct 31, 2015

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

@shoyer
Copy link
Contributor Author

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 [email protected]
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
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
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 as completed Dec 11, 2015
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