I’ve just been doodling with some data and the seaborn graphic library and managed to confuse myself a couple of times when quickly glancing at some “jointplots” that add marginal histograms to a scatter plot.
The code is easy enough:
sns.jointplot(x='Indoors Sub-domain Rank (where 1 is most deprived)', y='Outdoors Sub-domain Rank (where 1 is most deprived)', data=lsoaiw)
which give charts of the form:
but how do you intuitively see the histograms to compare them?
My at-a-glance (tired, past midnight…) reaction keeps “seeing” the top comparison, representing a 90 degree counterclockwise rotation about the top left corner of the y-axis chart. But if you think about for more than a glance, that obviously puts the large-y values at low-x, and low y-values at large-x.
The correct way is the bottom one; to make the comparison you need to flip the y-axis chart, folding its bottom right corner towards the top-left corner of the x-axis chart. This is a rotation and a reflection. Which is hard.
But if we do the flip to try to help (can we do this using seaborn???):
my eye now feels as if it wants to help out, keeping all the near corners of the various charts close together (top right of the y-axis chart, bottom left of the x-axis one, and top left of the main panel) all close together, and flipping the bottom left corner of the y-axis chart as if up to the top right corner of the x-axis chart. (i.e. in this configuration it wants to do the flip?)
The distribution of bars in the marginal charts may also be complicating matters, encouraging the eye to match large with large (which in this case is wrong…).