I need to plot two graphics just like the example below but for some reason 
your example crashes. Using facet_wrap seems to be the cause:
library(ggplot2)
upper <- with(economics, data.frame(date,value = psavert, position = "upper"))
upper
lower <- with(economics, data.frame(date,value = unemploy,position = "lower"))
lower
#upper$date <- as.Date(upper$date,"%m/%d/%Y")
#lower$date <- as.Date(lower$date,"%m/%d/%Y")
ggplot(mapping = aes(x=date, y=value)) + geom_line(data = upper) + 
geom_area(data = lower)  +
   facet_wrap(~ position, scale = "free_y",ncol=1)


Felipe D. Carrillo  Supervisory Fishery Biologist  Department of the Interior  
US Fish & Wildlife Service  California, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to