Purpose
Marginal Plot is an added feature to the scatter plot which gives the projection of x and y on the respective axis

Rug Plot which shows the marginal and regular plots

> x <- rnorm(1000)
> y <- rnorm(1000)
> plot(x, y)
> rug(x, side = 1, col = "blue")
> rug(y, side = 2, col = "blue")

MarginalPlot-001.jpg

Rug Plot which shows the marginal and regular plots

> x <- rnorm(1000)
> y <- rnorm(1000)
> plot(x, y)
> rug(jitter(x), side = 1, col = "blue")
> rug(jitter(y), side = 2, col = "blue")

MarginalPlot-002.jpg

One can use the car package to draw a fancy scatterplot

> library(car)
> scatterplot(x ~ y)

MarginalPlot-003.jpg