problem with sub in graphs
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Fri, 19 Jun 1998 15:10:41 +0200
>>>>> "Colin" == Colin Farrow <C.Farrow@geology.gla.ac.uk> writes:
Colin> with R-0.62.1 under Solaris 2.5.1.
Colin> Use of the graphical parameter 'sub' in a high level graphics
Colin> function is inconsistent, and incompatible with the blue book
>> plot(1:10, main="test", sub="demo")
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> ... and why so many warnings?
Because sub is part of the "..." which are passed down from plot.default()
to several lower-level functions,
each of which creates (at least) one warning.
>> hist(1:10, main="test", sub="demo")
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
Colin> Warning: parameter "sub" couldn't be set in high-level plot() function
The same here: hist.default() passes "..." to
title(..) -- where it works
and to axis(1,..) \
and axis(2,..) / where it fails and produces the two warnings.
Colin> ... despite the warnings the sub title is drawn !
Colin> I think the problem existed in earlier releases of R but the
Colin> warnings were not printed.
Exactly. And because the problem existed, I liked the warnings to appear.
The idea is that the R code (not the low level C graphics) should be fixed;
This would mean that R functions must make sure to only path
valid "..." stuff to C.
Usefully,
we would have a global option to turn off these warnings.
(as the other graphics warnings ! ==>
``par(err = -1)'' would be the thing
)
Martin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._