On 2010-12-01 01:51, Seth Roberts wrote:
coplot() usually puts grid lines in the panels it makes. To see examples,
example(coplot).

How can I remove those grid lines?
>
> Seth Roberts
>

That's hard-coded in coplot. But you can easily make a
modified copy of coplot. Here are the steps:

1. make a copy of coplot; call it mycoplot.
2. add this to the argument list of the function:

   col.grid = "lightgray"

3. find this line in the code:

   grid(lty = "solid")

and change it to

   grid(lty = "solid", col = col.grid)

4. source() your new function.

It wouldn't be a bad idea to also do

   environment(mycoplot) <- environment(coplot)

Now just set col.grid = "transparent"
(or col.grid = 0 should also work) when you
want to suppress the grid. This also gives you
the option of using other grid colours.

Peter Ehlers

______________________________________________
R-help@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.

Reply via email to