R/setupLegend.R

Defines functions setupLegend

Documented in setupLegend

setupLegend<- function( horizontal = FALSE,
                        legend.shrink = 0.9, 
                        legend.width = 1.2, 
                        legend.mar = ifelse(horizontal, 3.1, 5.1)
){
  # save current graphics settings
   
  temp <- imageplot.setup(add = FALSE, 
                          legend.shrink = legend.shrink, 
                          legend.width = legend.width ,
                          legend.mar= legend.mar, 
                          horizontal = horizontal,
                          bigplot = NULL,
                          smallplot = NULL)
  Info<- list(    smallplot = temp$smallplot, 
              legend.shrink = legend.shrink, 
                legend.mar  = legend.mar, 
               legend.width = legend.width ,
                 horizontal = horizontal)
#oldPar =  par(no.readonly = TRUE) )
  par(plt = temp$bigplot)
  
  return( Info)
}

Try the fields package in your browser

Any scripts or data that you put into this service are public.

fields documentation built on June 25, 2021, 5:08 p.m.