Hello all, Is it possible to change the radii line type in radial plots? I wasn't able to find anything online. Thanks, Bern -- View this message in context: http://r.789695.n4.nabble.com/Changing-radii-line-type-in-radial-plots-tp4647238.html Sent from the R help mailing list archive at Nabble.com.
Changing radii line type in radial plots
5 messages · Peter Ehlers, bwone, Jim Lemon
On 2012-10-23 15:22, bwone wrote:
Hello all, Is it possible to change the radii line type in radial plots? I wasn't able to find anything online.
Do please be more specific: which package's radial plot function are you using? Package plotrix has radial.plot() with an 'lty' argument. Peter Ehlers
Thanks, Bern -- View this message in context: http://r.789695.n4.nabble.com/Changing-radii-line-type-in-radial-plots-tp4647238.html Sent from the R help mailing list archive at Nabble.com.
I am using the package plotrix radial.plot(). Yes, radial.plot() has a line type argument, lty, but that is for the polygons or the radial lines, not the radii or axes of the radial plot.....unless I am doing something wrong. Thanks! -- View this message in context: http://r.789695.n4.nabble.com/Changing-radii-line-type-in-radial-plots-tp4647238p4647339.html Sent from the R help mailing list archive at Nabble.com.
On 2012-10-24 11:06, bwone wrote:
I am using the package plotrix radial.plot(). Yes, radial.plot() has a line type argument, lty, but that is for the polygons or the radial lines, not the radii or axes of the radial plot.....unless I am doing something wrong. Thanks!
First, even if you must post via Nabble, please do keep context. Now, as to your question: I think I now understand; you want control over the line type of the radial grid. You're correct; that's not currently possible with radial.plot(), but it's easy to modify the function and you can probably nudge Jim Lemon to make the change. In the meantime, here's a fix you can apply yourself: 1. Save the function code (either get the source or just use capture.output: capture.output(radial.plot, file = "rp.txt") 2. Edit the function; find the following two lines: polygon(xpos, ypos, border = grid.col, col = grid.bg) segments(0, 0, xpos, ypos, col = grid.col) and add the argument 'lty = grid.lty' to each. Then add 'grid.lty = 1' to the function arguments. Save the modified function as myradial.plot and source() it into your R session and then use it with whatever grid.lty setting you prefer. Peter Ehlers
-- View this message in context: http://r.789695.n4.nabble.com/Changing-radii-line-type-in-radial-plots-tp4647238p4647339.html Sent from the R help mailing list archive at Nabble.com.
On 10/25/2012 05:06 AM, bwone wrote:
I am using the package plotrix radial.plot(). Yes, radial.plot() has a line type argument, lty, but that is for the polygons or the radial lines, not the radii or axes of the radial plot.....unless I am doing something wrong.
Hi bwone, No, there is no way to change the line type of the grid in radial.plot at the moment. If you need to have different line types, you could change two lines in the function: polygon(xpos,ypos,border=grid.col,col=grid.bg) to polygon(xpos,ypos,border=grid.col,col=grid.bg,lty=my.lty) if(show.radial.grid) segments(0,0,xpos,ypos,col=grid.col) to if(show.radial.grid) segments(0,0,xpos,ypos,col=grid.col,lty=my.lty) I might be persuaded to add yet another argument to the function if anyone else wants different line types. Jim