Rug Plot R Ggplot2

Description a rug plot is a compact visualisation designed to supplement a 2d display with the two 1d marginal distributions.
Rug plot r ggplot2. Create elegant data visualisations using the grammar of graphics. 1992 statistical models in s. There will be a warning if any finite values are omitted but non finite values are omitted silently. Add marginal rugs to a scatter plot.
Description usage arguments details aesthetics examples. The function geom rug can be used. A string that controls which sides of the plot the rugs appear on. A rug plot is a compact visualisation designed to supplement a 2d display with the two 1d marginal distributions.
Because of the way rug is implemented only values of x that fall within the plot region are included. Note you can as well add marginal plots to show these distributions. Rug plots display individual cases so are best used with smaller datasets. The following example plot contains three layers.
Allowed value is a string containing any of trbl for top right bottom and left. A rug plot is a compact visualisation designed to supplement a 2d display with the two 1d marginal distributions. 1 opaque transparency of the rug s lines note that x and y can be used at the same time to draw rugs along both axes. Learn to create scatter plot in r with ggplot2 map variable plot regression loess line add rugs prediction ellipse 2d density plot change theme shape size of points add titles labels.
The first layer contains a horizontal rug in red the second layer contains a vertical rug in blue and the third layer shows the underlying points. Rug plots display individual cases so are best used with smaller datasets. You can easily add rug on x and y axis thanks to the geom rug function to illustrate the distribution of dots. A rug plot is a compact visualisation designed to supplement a 2d display with the two 1d marginal distributions.