0

I am making a simple line plot using ggplot2:

ggplot(data=GrayStandard, aes(x=Exposure, y=MeanLinear.VIS, 
                           group=Standard, colour=Standard ))+ 
  geom_line(size=1.5)+ coord_cartesian(xlim=c(0,30))+
  scale_color_manual(values=c(palette))+ylab("Mean value")+ xlab("Exposure")+
  theme(panel.background = element_rect(fill='white'), axis.line = element_line(colour="black"))+
  theme(text = element_text(size=15,face= "bold",colour="black"), panel.grid.major = element_blank(),
        panel.grid.minor = element_blank(),axis.line = element_line(colour="black"))+
theme(axis.text=element_text(size=13,colour="black"))#+theme(legend.position="none"))

But I need the x axis to be different than the default display because it has a lot of very small numbers at the beginning (left) and large numbers at the end (right). Any suggestions on how to change the whole axis to one scale? say every 0.2 units?

Thanks!

agamesh
  • 559
  • 1
  • 10
  • 26
li-arena
  • 19
  • 3
  • `scale_x_continuous(name="name123", breaks=c(1:4), limits=c(1,4))` something like that? this site is pretty useful http://shinyapps.stat.ubc.ca/r-graph-catalog/. – rmuc8 Feb 12 '15 at 10:32
  • I have tried the scale_x_continuous but it keeps giving me the error "Error: Discrete value supplied to continuous scale" – li-arena Feb 12 '15 at 11:26
  • 1
    I suppose you have searched for the error and tried to understand what it tells you. – Henrik Feb 12 '15 at 11:42

0 Answers0