Re: [R] Transparent Labels for Polar Plot

2010-09-14 Thread Jim Lemon

On 09/14/2010 06:25 AM, James MacCarthy wrote:

Hello,

I am currently using the polar.plot function in the plotrix package to graph 
data. Unfortunately, it seems that the default for the labels is to have a 
background color that is covering the line representing my data, making it 
difficult to read. Is there a way to make this label background transparent?


Hi Jimmy,
The easiest way is to change the following lines near the bottom of the 
radial.plot function:


boxed.labels(grid.pos-radial.lim[1],ypos,radial.labels,border=FALSE,
 cex=par(cex.lab))

to

text(grid.pos-radial.lim[1],ypos,radial.labels,cex=par(cex.lab))

If this is a Good Idea, I'll add an option to do one or the other.

Jim

__
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.


[R] Transparent Labels for Polar Plot

2010-09-13 Thread James MacCarthy
Hello,

I am currently using the polar.plot function in the plotrix package to graph 
data. Unfortunately, it seems that the default for the labels is to have a 
background color that is covering the line representing my data, making it 
difficult to read. Is there a way to make this label background transparent?

Example:

lengths - 0:72
bearing - seq(from=0, to=360, by=5)

polar.plot(lengths, bearing, labels = seq(from=0, to=340, by=20),label.pos = 
seq(from=0, to=340, by=20), start=90, clockwise=TRUE, rp.type=p, 
line.col=aquamarine3, lwd=2, main=Title, radial.lim=seq(from=0, to=90, 
by=15))

##label at length 20 blocks view of the line around bearing 100

Thanks for your help!
-Jimmy

__
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.