Skip to content
Prev 243607 / 398513 Next

how to remove grid lines from coplot graphs

On 2010-12-01 01:51, Seth Roberts wrote:
>
 > 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