In ggplot2, I set breaks for a histogram, and the tick labels automatically shows all the breaks, is there a way to customize the showing tick labels?
ggplot(plotdata,aes(x=vals))+
geom_histogram(aes(y=..density..),fill='cyan')+
geom_vline(aes(xintercept=mycrit,color='red'))+
scale_x_continuous(name='',breaks=mybreaks)+
theme(axis.text.x=element_text(angle=90))
I don't want that many tick labels, only a fraction of them, is there a way to do that?
I also tried setting binwidth instead of breaks and set labels, but I got the error messageBreaks and Labels are different lengths