I'm trying to create a JointGrid plot but I'm having some trouble with getting the aspect ratio right. The relevant code and the figure are attached below. Not sure what I'm doing wrong.
fig = plt.figure()
sns.set_style("ticks")
g = sns.JointGrid(X, Y, xlim=[0, max(X)], ylim=[0, max(Y)])
g.plot_marginals(sns.distplot, color=".5")
g.plot_joint(plt.hexbin, bins='log', gridsize=30, cmap=color)
And the output figure:
I'm not sure what I'm doing wrong; I looked at this: https://github.com/mwaskom/seaborn/issues/271 but the fix there didn't work.
Thank you!
I figured it out; posting my solution here just in case anyone has the same issue in the future.
I essentially just set the extents for both of them to be equal to the maximum value of the X array (which has a higher maxima than Y, causing the weird aspect ratio).
The end result is this: