Use of the graphical parameter 'sub' in a high level graphics function is inconsistent, and incompatible with the blue book> plot(1:10, main="test", sub="demo")Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in high-level plot() function ... and why so many warnings?> hist(1:10, main="test", sub="demo")Warning: parameter "sub" couldn't be set in high-level plot() function Warning: parameter "sub" couldn't be set in high-level plot() function ... despite the warnings the sub title is drawn ! I think the problem existed in earlier releases of R but the warnings were not printed. Above with R-0.62.1 under Solaris 2.5.1. -------------------- \ Colin Farrow \ \--------------------------------------- \ \ Department of Geology, \ E-mail: colin@geology.gla.ac.uk \ University of Glasgow, \ \ Glasgow, G12 8QQ. Scotland \ Tel: +44 (0)41 339 8855 x5466 \ \ Fax: +44 (0)41 330 4817 \ ````````````````````````````````````````````````````````````````````````` -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I understand the problem now. Clearly a more systematic approach to the use of ... is required. In the current example with plot and hist the problem arises because parameters of the title function are being passed to other low level graphical functions. The solution therefore is that only global graphical parameters such as col, are passed via ... and function specific parameters like sub need to be specified in the function definition. Hence in the current situation plot.default and hist.default require a sub= argument which should be passed only to the title function. It currently is not, and yes it would be handy to be able to turn off the warnings. Colin> > 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> > 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 > )-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._