From ripley@stats.ox.ac.uk  Tue Jan 30 07:40:51 2001
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Tue, 30 Jan 2001 08:40:51 +0100 (MET)
Subject: [Rd] screen can't go back to log="y" plot (PR#831)
Message-ID: <200101300740.IAA28911@pubhealth.ku.dk>

[I have abbreviated the subject as jitterbug has been having probems
with long subjects.]

The issue here is that one cannot mix log/non-log axes in the calls to
screen(), as the appropriate par() parameter is read-only, but the
meaning of yaxp depends on it.  But beyond that you can't set
x/yaxp for log axes.

You should be able to do this: you can in the S original.

A simpler version:

plot (1:2, 1:2, log="y", main="1")
zz <- par("yaxp")
zz
[1]  1  2 -5
par(yaxp=zz)
Error in par(yaxp = zz) : invalid value specified for graphics parameter
"yaxp".

So you can't reset the yaxp parameter to what it is reported as!


Additional bug: the meaning of x/yaxp for log axes is not defined
in help(par).


On Tue, 30 Jan 2001 tov@ece.cmu.edu wrote:

>
> Hi.  Let's try to explain the subject line with some code:
>
> > split.screen (c(2,1))
> [1] 1 2
> > screen(1)
> > plot (1:2, 1:2, log="y", main="1")
> > screen (2)
> > plot (1:2, 1:2, main="2")
> > screen (1)
> Error in par(.split.screens[[n]]) : invalid value specified for graphics parameter "yaxp".
> > close.screen(all=TRUE)
>
> Let's add comments:
>
> > split.screen (c(2,1))
> [1] 1 2
>
> OK, plot in the top half screen:
> > screen(1)
> > plot (1:2, 1:2, log="y", main="1")
> > par("yaxp")
> [1]  1  2 -5
>
> OK, switch to bottom half:
> > screen (2)
> > plot (1:2, 1:2, main="2")
> > par("yaxp")
> [1] 1 2 5
>
> OK, looks fine, let's go back up:
> > screen (1)
> Error in par(.split.screens[[n]]) : invalid value specified for graphics parameter "yaxp".
>
> Bummer.
> > close.screen(all=TRUE)
>
> Somehow I'm hoping you'll tell me I'm doing something wrong, because
> I'd really would like to be able to do the following:
>   repeat {
>     #calculate
>     screen(1)
>     #fancy plot
>     screen (2)
>     #even fancier plot ;-)
>     if (user.bored()) break
>   }
> Which is roughly what I was doing when the error messages started
> popping up.
>
> Thanks,
>   -tom
>
> --please do not edit the information below--
>
> Version:
>  platform = i386-pc-linux-gnu
>  arch = i386
>  os = linux-gnu
>  system = i386, linux-gnu
>  status =
>  major = 1
>  minor = 2.1
>  year = 2001
>  month = 01
>  day = 15
>  language = R
>
> Search Path:
>  .GlobalEnv, package:ctest, Autoloads, package:base
>
>
>
> --
> mailto:tov@ece.cmu.edu (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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] screen can't go back to log="y" plot (PR#831)
ripley@stats.ox.ac.uk