hadley wickham
2010-Feb-03 19:15 UTC
[R] ggplot2/qplot question regarding reducing the no. of x-axis labels
Hi Thomas, Please provide a reproducible example. The most likely explanation is that after loading your data you haven't converted your "date" variable from a factor into a real date. Hadley On Wed, Feb 3, 2010 at 1:15 PM, Thomas Adams <Thomas.Adams at noaa.gov> wrote:> All: > > I am using the command: qplot(date,MAE,data=data,facets=INTERVAL~type) which > works fine except that the dates for my date axes are crunched together so > much that they are unreadable. I can not find an option that I can set that > will automatically reduce the x-axis labels to fit the available space. > > regards to all? > > -- > Thomas E Adams > National Weather Service > Ohio River Forecast Center > 1901 South State Route 134 > Wilmington, OH 45177 > > EMAIL: ?thomas.adams at noaa.gov > > VOICE: ?937-383-0528 > FAX: ? ?937-383-0033 > > ______________________________________________ > R-help at 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. >-- http://had.co.nz/
Thomas Adams
2010-Feb-03 19:15 UTC
[R] ggplot2/qplot question regarding reducing the no. of x-axis labels
All: I am using the command: qplot(date,MAE,data=data,facets=INTERVAL~type) which works fine except that the dates for my date axes are crunched together so much that they are unreadable. I can not find an option that I can set that will automatically reduce the x-axis labels to fit the available space. regards to all? -- Thomas E Adams National Weather Service Ohio River Forecast Center 1901 South State Route 134 Wilmington, OH 45177 EMAIL: thomas.adams at noaa.gov VOICE: 937-383-0528 FAX: 937-383-0033
Thomas Adams
2010-Feb-03 20:18 UTC
[R] ggplot2/qplot question regarding reducing the no. of x-axis labels
Dennis, Thanks; that's just what I needed! Regards, Tom Dennis Murphy wrote:> Hi: > > ggplot2 works with dates of class date and times of class POSIXct. > See scale_x_date(), which is discussed in section 6.4.2 of the ggplot2 > book. > > HTH, > Dennis > > On Wed, Feb 3, 2010 at 11:15 AM, Thomas Adams <Thomas.Adams at noaa.gov > <mailto:Thomas.Adams at noaa.gov>> wrote: > > All: > > I am using the command: > qplot(date,MAE,data=data,facets=INTERVAL~type) which works fine > except that the dates for my date axes are crunched together so > much that they are unreadable. I can not find an option that I can > set that will automatically reduce the x-axis labels to fit the > available space. > > regards to all? > > -- > Thomas E Adams > National Weather Service > Ohio River Forecast Center > 1901 South State Route 134 > Wilmington, OH 45177 > > EMAIL: thomas.adams at noaa.gov <mailto:thomas.adams at noaa.gov> > > VOICE: 937-383-0528 > FAX: 937-383-0033 > > ______________________________________________ > R-help at r-project.org <mailto:R-help at 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. > >-- Thomas E Adams National Weather Service Ohio River Forecast Center 1901 South State Route 134 Wilmington, OH 45177 EMAIL: thomas.adams at noaa.gov VOICE: 937-383-0528 FAX: 937-383-0033