[R] plotting issue

Duncan Murdoch murdoch.duncan at gmail.com
Mon Sep 9 19:17:02 CEST 2013


On 09/09/2013 12:55 PM, Kristi Glover wrote:
> Hi R user,
> I was trying to put four figures in a row, in which value of Y axis are similar but different in X axis. Therefore I wanted to put four figures in row.
>
> To remove y axis for second, thrid and forth figures, I used [yaxt="n"]. But, I saw that tick mark of Y was found to be missing. I dont want value in y axis but still I want tick mark. How is it possible?
> Example
> plot(data1$y, data2$x1, pch=".", cex=1)
> plot(data1$y, data2$x2, pch=".", cex=1, yaxt="n")# here I lost tick marks on y axis: I want tick mark but not text
> plot(data1$y, data2$x3, pch=".", cex=1, yaxt="n")
> plot(data1$y, data2$x4, pch=".", cex=1, yaxt="n")

After plotting with yaxt="n", add the ticks using axis(2, 
labels=FALSE).  (There are many more options to axis, so you have a lot 
of flexibility here.)

Duncan Murdoch



More information about the R-help mailing list