A scatterplot is a graph in which the values of two variables are plotted along two axes, the pattern of the resulting points revealing any correlation present.

It is sometimes important to check the distribution of variables of the X and Y axis. This can be done by adding marginal plots. The ggExtra library allows one to do it easily thanks to Dean Attali.

Note that you can customize the margins’ width or their features, and you can show the margin for only one axis.

Not what you are looking for ? Make a new search !


Leave a Reply

Notify of