@@ -156,30 +156,3 @@ check_legend_name <- function(legend.name, prev_calls){
156156 if (! is.null(legend.name ) && sum(prev_calls != 0 )){ legend.name <- NULL }
157157 return (legend.name )
158158}
159-
160-
161- # What is this for?
162- # legend_adjusted_margins <- function(gsPlot) {
163- # defaults <- config("plot")
164- # defaultMargins <- c(3, 3, 3, 3) #default margins should come from config
165- # leftRightMarginMultiplier <- 2 #load in config?
166- #
167- # if(!is.null(gsPlot$legend)) {
168- # location <- gsPlot$legend$legend.gs.config$location
169- # legend_offset <- ceiling(1 / gsPlot$legend$legend.gs.config$legend_offset)
170- # if(location == "below") {
171- # mar <- c(defaultMargins[1] + legend_offset, defaultMargins[2], defaultMargins[3], defaultMargins[4])
172- # } else if(location == "above") {
173- # mar <- c(defaultMargins[1], defaultMargins[2], defaultMargins[3] + legend_offset, defaultMargins[4])
174- # } else if(location == "toright") {
175- # mar <- c(defaultMargins[1], defaultMargins[2], defaultMargins[3], defaultMargins[4] + (legend_offset * leftRightMarginMultiplier))
176- # } else if(location == "toleft") {
177- # mar <- c(defaultMargins[1], defaultMargins[2] + (legend_offset * leftRightMarginMultiplier), defaultMargins[3], defaultMargins[4])
178- # } else {
179- # mar <- defaultMargins
180- # }
181- # } else {
182- # mar <- defaultMargins
183- # }
184- # return(mar)
185- # }
0 commit comments