[Rd] (PR#849)
Paul Murrell
paul@stat.auckland.ac.nz
Fri, 16 Feb 2001 08:19:13 +1300
Hi
> The symbol( circle) function does not create
> circles.
>
> See following function
>
> ijwbug <- function()
> {
> plot.new()
> plot.window(c(-1,1),c(-1,1));
> symbols(0,0,circle=1,add=T,inches=F);
>
> curve(sqrt(1 - x^2), from = -1, to = 1, add = T, lty = 1)
> curve(-sqrt(1 - x^2), from = -1, to = 1, add = T, lty = 1)
> lines(c(-1,1),c(1,1));
> lines(c(-1,1),c(-1,-1));
>
>
> }
If I understand correctly, I think you're just seeing clipping.
Does the slight modification of your function given below behave as you
would expect ?
ijwbug <- function()
{
# do not clip to figure region, clip only to device region
par(xpd=NA)
plot.new()
plot.window(c(-1,1),c(-1,1));
symbols(0,0,circle=1,add=T,inches=F);
# I have added colour to the curves
curve(sqrt(1 - x^2), from = -1, to = 1, add = T, lty = 1, col="red")
curve(-sqrt(1 - x^2), from = -1, to = 1, add = T, lty = 1, col="red")
lines(c(-1,1),c(1,1));
lines(c(-1,1),c(-1,-1));
}
Paul
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._