Reputation: 157
I have the data income
plotted in graph
I would like to fill in a color under the data line, I am using qplot
for that.
Is there any possibility I can do that?
The code below shows shows how it was plotted, I do not mind using ggplot2 as well as long as I can fill under it
qplot(dat$amount_WW,dat$location, group = 1, geom=c("line","point"), ylab="amount",xlab="location",main="Ages 18-25")
Thank alot for your help
Upvotes: 0
Views: 55
Reputation: 54237
You can use geom=c("line","point", "area")
and set the fill color using fill
:
library(ggplot2)
set.seed(1)
df <- data.frame(x=1:10, y=runif(10))
qplot(x, y, data=df, geom=c("line","point", "area"), fill="red")
Upvotes: 1