I am trying to plot a density with the following function. However It doesn't achieve the look I'm going for... I was wondering if there was a way to make the left and right edges of the plot smooth down to the baseline (so that it no longer has a square edge on the left and right.)
fig1<-ggplot(data=mtcars, aes(x=mpg, fill=as.factor(am))) +
geom_density(aes(y=..density..), poisition = "identity", color = "black", alpha = 0.5) +
geom_rug(aes(colour = as.factor(am))) +
scale_x_continuous() +
labs(fill = "Transmission", colour = "Transmission")
fig1