Skip to content
Prev 309324 / 398506 Next

Changing radii line type in radial plots

On 2012-10-29 11:34, Bernie Wone wrote:
That wasn't clear in your original request. But it's easy.
To provide arguments for setting the circle/radius line types
separately is essentially the same process that I've already
shown you. Modify the same two lines that I referenced in the
previous discussion:

1. Change

    polygon(xpos, ypos, border = grid.col, col = grid.bg)

to

    polygon(xpos, ypos, border = grid.col, col = grid.bg,
            lty = gridcircle.lty)

and

    segments(0, 0, xpos, ypos, col = grid.col)

to

    segments(0, 0, xpos, ypos, col = grid.col,
             lty = gridradius.lty)

Then add two arguments to the function's argument list:

    gridradius.lty = 1, gridcircle.lty = 1

Modification that will permit different colours for the
circles/radii is left as an exercise.

Peter Ehlers