Possible Duplicate:
can I separately control the x and y axes using ggplot?
I saw an earlier post describing how to do this (can I separately control the x and y axes using ggplot?)-but it doesn´t work in ggplot 0.9.0. Any ideas how I can remove only the y-axis line, and not the x axis line. The axis.line option does not allow any differenatiation between the two axes.
u<-expand.grid(temp=seq(0,100,10),hum=c(20,90),delta=as.factor(seq(0,10,by=5)))
u$model<-exp(u$temp*log(0.88)+u$hum*log(1.01)+as.numeric(u$delta)*log(1.1))
u2<-subset(u,hum==20)
u4<-subset(u,hum==90)
pl<-ggplot()+
geom_line(data=u2,aes(x=u2$temp,y=u2$model,colour=u2$delta,group=u2$delta))+
geom_line(data=u4,aes(x=temp,y=model,colour=delta,group=delta))
pl+theme_bw()+
opts(panel.grid.minor=theme_blank(),
panel.grid.major=theme_blank(),
legend.key=theme_blank(),
panel.border=theme_rect(colour=NA),
axis.line=theme_segment(colour='grey',size=1))
Now - how can I just have the x-axis and not the y-axis line?
The earlier post recommended
grid.remove(gPath("axis_v", "axis.line.segments"), grep=TRUE)
resulting in
Error in removeDLFromGPath(gPath, name, strict, greppath, grepname, global, : gPath (axis_v::axis.line.segments) not found
//M