0

I have the data income plotted in graph Income 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

Ash A
  • 147
  • 1
  • 1
  • 12
  • Could you please make your example reproducible? This may help http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Hack-R Jun 20 '16 at 14:32
  • It worked! How to you change the color of the filling now? – Ash A Jun 20 '16 at 14:35

1 Answers1

1

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")
lukeA
  • 53,097
  • 5
  • 97
  • 100