[R] ggplot: Axis lines

hadley wickham h.wickham at gmail.com
Tue Apr 8 05:29:36 CEST 2008

Hi Pedro,

>  I am trying to print some simple ggplot plots, but I would like to
>  have no gridlines, and no border.
>  I have achieved this using ggopt(grid.lines='NA', border.lines='NA').
>  However, this also clears the axis lines, and reading the help, it
>  looks like the "axis" objects have only two slots, "label" and "ticks".
>  How can I get rid of gridlines and border, and still keep the axis lines?

There's no built in way to do this at the moment.  However you can
always modify the underlying grid objects - see the last chapter of
the ggplot2 book.



More information about the R-help mailing list