-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Axis Attributes
bhive01 edited this page Sep 23, 2010
·
12 revisions
#create simple dataframe for plotting
x<- 1:10
y<- 10:1
xy<-as.data.frame(cbind(x,y))
#create base plot
plot<- ggplot(data=xy)+
geom_point(aes(x=x, y=y))
#plot base plot
plot
#color doesn't work, need colour
plot+ opts(axis.line = theme_segment(colour='red', size=3, linetype='dashed'))
#color doesn't work, need colour
plot+ opts(axis.text.x = theme_text(colour='red', angle= 45, size=10, hjust=-3, vjust=7, face='italic'))
#color doesn't work, need colour
plot+ opts(axis.text.y = theme_text(colour='red', angle= 45, size=10, hjust=-3, vjust=7, face='italic'))
#color doesn't work, need colour
plot+ opts(axis.title.x = theme_text(colour='red', angle= 45, size=10, hjust=-3, vjust=7, face='italic'))
#color doesn't work, need colour
plot+ opts(axis.title.y = theme_text(colour='red', angle= 45, size=10, hjust=-3, vjust=7, face='italic'))
#color doesn't work, need colour
plot+ opts(axis.ticks = theme_segment(colour='red', size=3, linetype='dashed'))