Wandering usr values in par(no.readonly=TRUE) (PR#2283)
maechler@stat.math.ethz.ch
maechler@stat.math.ethz.ch
Wed, 13 Nov 2002 18:48:27 +0100 (MET)
>>>>> "Marc" == Marc Schwartz <mschwartz@medanalytics.com>
>>>>> on Wed, 13 Nov 2002 11:01:49 -0600 writes:
Marc> Marc Schwartz wrote:
>> SNIP
>>
>> I am guessing that this may be the result of par("ylog")
>> and par("xlog") being read only and perhaps impacting the
>> restoration of the par("usr") values when the plotting
>> device is still open, but that may be incorrect.
Marc> In follow up to my own note from last evening on this
Marc> and now that I have had a couple of cups of coffee
Marc> this morning, I need to partially correct my above
Marc> statement and point to a presumed typo in the ?par
Marc> help file. For confirmation, this is R 1.6.1 under
Marc> WinXP Pro.
Marc> par("xlog") and par("ylog") are not Read Only
Marc> parameters as listed in the help file and can be set
Marc> by the user. Indeed this is confirmed in the comments
Marc> in par.r:
Marc> #.Pars.readonly <- c("cin","cra","csi","cxy","din")
Marc> I noted this today as I was comparing the output of
Marc> par() with par(no.readonly = TRUE) and noted that the
Marc> latter returns '$xlog' and $ylog' as being
Marc> settable. The other 5 par values listed in ?par as
Marc> "R.O." (cin, cra, csi, cxy and din) return errors when
Marc> one attempts to set them with par(args), however xlog
Marc> and ylog do not.
Yes, indeed, and I -- as an R-core member -- am astonished:.
I didn't know it really worked, but it does, e.g.,
> plot(1:10); par("usr")
[1] 0.64 10.36 0.64 10.36
> par(xlog = TRUE); par(c("xlog","usr"))
$xlog
[1] TRUE
$usr
[1] -0.1938200 1.0153598 0.6400000 10.3600000
> points(10^(1:9), 1 + 1:9, col = "red") # draws red points above
I'm now re-directing this back to R-bugs to make sure that
the only (right?) remaining bug, documentation in par.Rd,
will be fixed -- and hope to close this as a bug report.
Marc> ..........
Marc> <more good analysis>
Thank you Marc!
Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._