Re: [R] questions regarding stat_smooth in ggplot area plot

2011-03-25 Thread Werner Heijstek
Hi Dennis, Thanks a lot for your insights. I 'solved' the negative smooth by not using an xlim() but an ylim(). If I may, I'll ask a third question: How to plot multiple of these ggplot area plots on top of one another so that the same x-axis is shared? vp.layout <- function(x, y) viewport(layo

[R] questions regarding stat_smooth in ggplot area plot

2011-03-24 Thread jovian
Hello, I drew a simple area plot using ggplot2 using set <- read.table(file="http://www.jovian.nl/set.csv";, head=1, sep=",") library(ggplot2) ggplot() + layer( data = set, mapping = aes(x = time, y = hours), geom = "area", stat="smooth", color="red" ) + layer( data = set, mapping = aes(x