11#
22# resolve.defaults.R
33#
4- # $Revision: 1.41 $ $Date: 2024/10/28 05:40:08 $
4+ # $Revision: 1.44 $ $Date: 2024/12/02 04:15:06 $
55#
66# Resolve conflicts between several sets of defaults
77# Usage:
88# resolve.defaults(list1, list2, list3, .......)
99# where the earlier lists have priority
1010#
11+ # Also
12+ # graphicsPars(functionname)
13+ # gives names of arguments recognised by 'functionname'
14+ # which may not be formal arguments.
1115
1216resolve.defaults <- function (... , .MatchNull = TRUE , .StripNull = FALSE ) {
1317 # # Each argument is a list. Append them.
@@ -115,15 +119,20 @@ passthrough <- function(.Fun, ..., .Fname=NULL) {
115119
116120graphicsPars <- local({
117121 # # recognised additional arguments to image.default(), axis() etc
122+ AxisArgs <- c(" cex" , " font" ,
123+ " cex.axis" , " cex.lab" ,
124+ " col.axis" , " col.lab" ,
125+ " font.axis" , " font.lab" ,
126+ " mgp" , " xaxp" , " yaxp" , " tck" , " tcl" , " las" , " fg" , " xpd" )
118127 PlotArgs <- c(
119128 " main" , " asp" , " sub" , " axes" , " ann" ,
120- " cex" , " font" ,
121- " cex.axis" , " cex.lab" , " cex.main" , " cex.sub" ,
122- " col.axis" , " col.lab" , " col.main" , " col.sub" ,
123- " font.axis" , " font.lab" , " font.main" , " font.sub" )
124-
129+ AxisArgs ,
130+ " cex.main" , " cex.sub" ,
131+ " col.main" , " col.sub" ,
132+ " font.main" , " font.sub" )
125133 TextDefArgs <- setdiff(names(formals(text.default )), " ..." )
126134 TextArgs <- c(TextDefArgs , " srt" , " family" , " xpd" )
135+ TitleArgs <- c(" line" , " outer" , " adj" )
127136
128137 TheTable <-
129138 list (plot = PlotArgs ,
@@ -135,7 +144,7 @@ graphicsPars <- local({
135144 " cex.axis" , " cex.lab" , " cex.main" , " cex.sub" ,
136145 " col.axis" , " col.lab" , " col.main" , " col.sub" ,
137146 " font.axis" , " font.lab" , " font.main" , " font.sub" ,
138- " claim.title.space" ),
147+ " claim.title.space" , " adj.main " ),
139148 axis = c(
140149 " cex" ,
141150 " cex.axis" , " cex.lab" ,
@@ -151,19 +160,21 @@ graphicsPars <- local({
151160 " col.main" , " col.sub" ,
152161 " font.main" , " font.sub" ,
153162 " xaxs" , " yaxs" ,
154- " claim.title.space" ),
163+ " claim.title.space" , " adj.main " ),
155164 lines = c(" lwd" , " lty" , " col" , " lend" , " ljoin" , " lmitre" ),
156165 symbols = c(PlotArgs , " fg" , " bg" ),
157166 points = c(" pch" , " col" , " bg" , " fg" , " cex" , " lwd" , " lty" ),
158167 text = TextArgs ,
159- persp = c(" x" , " y" , " z" ,
160- " xlim" , " ylim" , " zlim" ,
161- " xlab" , " ylab" , " zlab" ,
162- " main" , " sub" ,
163- " theta" , " phi" , " r" , " d" , " scale" ,
164- " expand" , " col" , " border" ,
165- " ltheta" , " lphi" , " shade" , " box" ,
166- " axes" , " nticks" , " ticktype" )
168+ title = union(TitleArgs , AxisArgs ),
169+ persp = union(TitleArgs ,
170+ c(" x" , " y" , " z" ,
171+ " xlim" , " ylim" , " zlim" ,
172+ " xlab" , " ylab" , " zlab" ,
173+ " main" , " sub" ,
174+ " theta" , " phi" , " r" , " d" , " scale" ,
175+ " expand" , " col" , " border" ,
176+ " ltheta" , " lphi" , " shade" , " box" ,
177+ " axes" , " nticks" , " ticktype" ))
167178 )
168179
169180 TheTable $ ppp <- unique(c(TheTable $ owin ,
0 commit comments