This post is visualizing the Wine dataset.

You may have noticed that the figures along the diagonal look different. They are histograms of values of individual variables. We can see that the "Ash" and "Alcalinity of ash" variables are roughly normally distributed.

Here is the first figure along the diagonal.

enter image description here

Consider the Alcohol column, is the correlation of Alcohol and itself the histogram or just for programming convenience?

  • $\begingroup$ A scatter plot (in my reading a more common term than correlation plot) of a variable against itself would be informative, as it shows the distribution of that variable on the diagonal $y = x$. You would certainly see marked outliers and perhaps other features too, depending partly on the number in the sample. But a histogram or density plot is often easier to think about. $\endgroup$ – Nick Cox Sep 18 '19 at 15:41

Seaborn's pairplot gives out what's called a "correlation plot" (see another example using MATLAB here). Since a correlation of a variable $X$ and itself is always one, there's little use displaying this. So by convention these plots plot out the variable's histogram/distribution instead. This is also noted in the function's documentation:

The diagonal Axes are treated differently, drawing a plot to show the univariate distribution of the data for the variable in that column.

| cite | improve this answer | |
  • $\begingroup$ Thanks for your answer. In the context of "Alcohol", is the figure in my post a histogram plot? $\endgroup$ – whnlp Sep 18 '19 at 5:40
  • $\begingroup$ It's an empirical distribution, which is more or less a continuous version of the histogram. You might look up "kernel density estimation", "distribution", and "histogram" for more info. $\endgroup$ – Art Sep 18 '19 at 6:14
  • $\begingroup$ Thanks a lot. Could you help to take a loot at this how “empirical distribution histogram” relates to “histogram”? $\endgroup$ – whnlp Sep 18 '19 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.