From p.dalgaard@pubhealth.ku.dk  Thu Feb 15 21:22:01 2001
From: p.dalgaard@pubhealth.ku.dk (Peter Dalgaard BSA)
Date: 15 Feb 2001 22:22:01 +0100
Subject: [Rd] (PR#849)
In-Reply-To: "Paul Murrell"'s message of "Fri, 16 Feb 2001 08:19:13 +1300"
References: <200102151759.SAA06837@pubhealth.ku.dk> <007701c09784$2e4e3b10$175dd882@stat.auckland.ac.nz>
Message-ID: <x2vgqb63ra.fsf@blueberry.kubism.ku.dk>

"Paul Murrell" <paul@stat.auckland.ac.nz> writes:

> 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

Actually, I think the real problem is that the plotting region is not
square, so  curve(sqrt(1 - x^2),...) is an ellipse. Insert
par(pty="s") to fix that.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] (PR#849)
Peter Dalgaard BSA