Dave
unread,Apr 3, 2012, 6:33:50 PM4/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
I hope this is a simple question but unfortunately I've spent quite a
bit of time reading through the ggplot2 documentation and the ggplot2
book with no success. I want to rotate the x-axis label to a
perpendicular position as opposed to the default horizontal label
angle. Here's the snippet of code that creates the graph.
ggplot(byr, # data set name is 'byr'
aes(Date, Count, color=PH)) + # values for horizontal and vertical
axes
geom_point() + # scatter plot
geom_smooth(method=lm) + # regression line
facet_wrap(~Unit)+ # separately plot each subject by his unique
identifier
scale_x_date(major="1 week",format = "%d/%m")
I want the x-axis (i.e., Date) to display perpendicular to the axis in
a similar fashion to using the par(las=2) for the standard plot
options. It would be wonderful if I could angle the display of the
labels. Given the default horizontal display, the Dates overlap too
much to make anything recognizable even using the shorter format.
What am I missing? Thanks!