[R] in axis() suppressing axis line but keeping tick marks

Gabor Grothendieck ggrothendieck at gmail.com
Tue Jun 17 03:12:13 CEST 2008

You could try overwriting the axis with a white axis line
so it blends into the background.

plot(1:10, axes = FALSE)
axis(1, col = "white", tcl = 0)

On Mon, Jun 16, 2008 at 2:52 PM, Andrew Yee <yee at post.harvard.edu> wrote:
> I've been trying to figure out a parameter that will let you separately
> adjust the parameters for the axis line from the tick mark.
> In the following example, I would like to suppress the axis line, but keep
> the tick marks.
> Thanks,
> Andrew
> foo <- data.frame(x=1:3, y=4:6)
> plot(foo$x, foo$y, type="n", axes=F)
> points(foo$x, foo$y)
> axis(side=1, at=foo$x, lty=0) #would like to figure out way to keep tick
> marks, but suppress axis line
>        [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> 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.

More information about the R-help mailing list