p.b.pynsent@bham.ac.uk
2003-Jul-31 18:20 UTC
[Rd] Mac OS 10 (not X11) failure to rotate symbols (PR#3602)
In the following code the arrow symbols do not rotate with the text on
the Mac OS window, however the do rotate on X11 port on Mac OS.
(R version 1.71)
x <- c(0,10.)
y <- c(0,10.)
offset <- 3
centre <- 5
plot(x,y, xlim=range(x), ylim=range(y),type="n",
xlab="",ylab="",
main="",xaxt="n",yaxt="n")
for (i in (seq(0, 340, by=45)) )
{
px <- centre + cos((i*pi)/180) * offset
py <- centre + sin((i*pi)/180) * offset
text(px, py,
labels=substitute(that%->%phantom(1),list(that=i)), pos=1,
col="blue",
cex=0.7, srt=i)
text(px, py,
labels=substitute(that%<-%phantom(1),list(that=i)), pos=3,
col="blue",cex=0.7,srt=i)
lines(px, py, type="p", col="black") #just for reference
}
Many thanks.
Paul
Dr. P. B. Pynsent,
Research and Teaching Centre,
Royal Orthopaedic Hospital,
Birmingham, B31 2AP, U.K.
Prof Brian Ripley
2003-Aug-04 08:36 UTC
[Rd] Mac OS 10 (not X11) failure to rotate symbols (PR#3602)
This is not a bug: it is documented. Please read what help(par) says about rotation under crt. I have already pointed this out to you (twice), as well as the fact that there is no `R version 1.71' and that that port of R is now frozen. On Thu, 31 Jul 2003 p.b.pynsent@bham.ac.uk wrote:> > In the following code the arrow symbols do not rotate with the text on > the Mac OS window, however the do rotate on X11 port on Mac OS. > (R version 1.71) > x <- c(0,10.) > y <- c(0,10.) > offset <- 3 > centre <- 5 > plot(x,y, xlim=range(x), ylim=range(y),type="n", xlab="",ylab="", > main="",xaxt="n",yaxt="n") > for (i in (seq(0, 340, by=45)) ) > { > px <- centre + cos((i*pi)/180) * offset > py <- centre + sin((i*pi)/180) * offset > text(px, py, > labels=substitute(that%->%phantom(1),list(that=i)), pos=1, col="blue", > cex=0.7, srt=i) > text(px, py, > labels=substitute(that%<-%phantom(1),list(that=i)), pos=3, > col="blue",cex=0.7,srt=i) > lines(px, py, type="p", col="black") #just for reference > } > > Many thanks. > Paul > > > Dr. P. B. Pynsent, > Research and Teaching Centre, > Royal Orthopaedic Hospital, > Birmingham, B31 2AP, U.K. > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595