Is this what you want? library(ggplot2) rawData <- data.frame(Date = c("2008-03-01", "2008-03-21", "2008-03-23", "2008-04-08", "2008-04-20", "2008-05-10", "2008-06-20"), y = c(4, 6,8, 5, 7, 2 ,1)) rawData$Date <- as.Date(rawData$Date) qplot(Date,y,data=rawData,geom="line",xlim=c(as.Date("2008-1-1"),as.Date("2008-12-1")))
--- On Thu, 9/4/08, Dr Eberhard W Lisse <[EMAIL PROTECTED]> wrote: > From: Dr Eberhard W Lisse <[EMAIL PROTECTED]> > Subject: Re: [R] (with subject) > To: r-help@r-project.org > Cc: "Dr Eberhard W Lisse" <[EMAIL PROTECTED]> > Date: Thursday, September 4, 2008, 12:15 PM > Dirk, Gabor, > > thanks for your advice, I have now tried to study these > vignettes, but I must say, as an aging Gynecologist, > I am facing an enormous learning curve :-)-O. > > This works nicely: > > rawData <- data.frame(x = c("2008-03-01", > "2008-03-21", "2008-03-23", > "2008-04-08", "2008-04-20", > "2008-05-10", "2008-06-20"), y = c(4, 6, > > 8, 5, 7, 2 ,1)) > rawData[,"x"] <- > as.Date(rawData[,"x"]) > with(rawData, plot(x, y, main="Some text", > type='l')) > > How do I make the X-Axis start on 2008-01-01, end on > 2008-12-31, > with tick marks for every month (ie month.abb[1:12] or > something > similar)? > > A pointer is enough, weekend is coming up and I am off > :-)-O > > I also need to add 2 lines statements, but I reckon I can > figure that > out > by myself :-)-O > > > greetings, el > -- > Dr. Eberhard W. Lisse \ / Obstetrician & > Gynaecologist (Saar) > [EMAIL PROTECTED] el108-ARIN / * | Telephone: +264 81 124 > 6733 (cell) > PO Box 8421 \ / Please send DNS/NA-NiC > related e-mail > Bachbrecht, Namibia ;____/ to > [EMAIL PROTECTED] > > ______________________________________________ > 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. ______________________________________________ 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.