uneven spacing on axis with R

后端 未结 3 992
夕颜
夕颜 2021-01-14 21:02

I have a problem in plotting uneven scale plot on x axis with R

Here is an example:

plot(1:100,1:100)

will give the equal tick spac

3条回答
  •  感动是毒
    2021-01-14 21:23

    You could log the x axis:

    x<-1:100
    y<-1:100
    plot(log(x,base=10),y,axes=F)
    axis(2)
    axis(1,at=0:2,labels=10^(0:2))
    

    enter image description here

提交回复
热议问题