Hi

Although I could find some answers on how to add minor ticks on a ggplot on 
stack overflow, I could not figure to how to add them to the following example:

library(ggplot2)

x <- data.frame(V1=runif(1000, -6.0, 6.0),V2=runif(1000, -6.0, 6.0));

               
g<-ggplot(x,aes(V1,V2))+geom_point(size=1.5)+theme_bw()
g<-g+scale_y_continuous(name="y(t)")+scale_x_continuous(name="x(t)")
g<-g+theme(axis.title.x = element_text(face="italic", size=20),axis.title.y = 
element_text(face="italic", size=20))
g<-g+theme(axis.text.x  = element_text(angle=0, vjust=0.5, size=16),axis.text.y 
 = element_text(angle=0, vjust=0.5, size=16))
g<-g+coord_cartesian(xlim=c(min(x[,1]),max(x[,1])), 
ylim=c(min(x[,2]),max(x[,2])))
print(g)

How to add gridlines (or points) to the minor ticks?

Many thanks

Ed

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to