\name{PlotMultiMap}
\alias{PlotMultiMap}
\title{Plots Multiple Maps on a Device}
\description{
This function automatically arranges the layout of a device to handle
as many map plots as data is provided for in the input 'var'. The 
parameter 'var' can have multiple forms: multidimensional array (with 
named dimensions or with the atribute 'dimensions') or list of 
multidimensional arrays. Each map in each of the provided arrays is 
accounted for and plotted. The number of columns and rows is computed
automatically but can also be adjusted manually. Either PlotEquiMap() or
PlotStereoMap() can be used to generate the plots. One of them can be 
selected via the parameter 'fun'. The legend is also placed and 
dimensioned automatically but can be adjusted via 'drawleg' and 
'sizeleg'. The break colours are generated automatically via 
\code{clim.colors()} by default, or by any other color generator function. 
The number of breaks (hence colours) can be adjusted. Titles can be provided 
for each plot and the number of decimal digits shown in the legend can be 
adjusted. Additional parameters to the core map plotting function can be 
provided via '...',
}
\usage{
PlotMultiMap(var, fun, ..., nrow = NULL, ncol = NULL, drawleg = 'S', 
             titles = NULL, nbrks = 21, digits = 1, 
             color_fun = clim.colors, sizeleg = 1, subsampleg = 1)
}
\arguments{
  \item{var}{
Either a multidimensional array, that can have dimension names or the
attribute 'dimensions', or a list of multidimensional arrays. The 
multiple arrays provided do not need to have the dimensions in the same
order. The 'lat' and 'lon' dimensions are detected automatically if 
enough information is provided. Otherwise, the last two dimensions are
supposed to be the ones for 'lat' and 'lon'.
  }
  \item{fun}{
Map plotting function. Either \code{PlotEquiMap} or \code{PlotStereoMap}.
  }
  \item{...}{
Additional parameters to PlotEquiMap or PlotStereoMap.
  }
  \item{nrow}{
Number of rows of the multipanel layout. Computed automatically if not
specified.
  }
  \item{ncol}{
Number of columns of the multipanel layout. Computed automatically if 
not specified.
  }
  \item{drawleg}{
FALSE if no legend is desired, TRUE if desired and want PlotMultiMap() 
to place it automatically, or any of the following values to position it
manually: 'up', 'u', 'U', 'top', 't', 'T', 'north', 'n', 'N', 'down', 
'd', 'D', 'bottom', 'b', 'B', 'south', 's', 'S', 'right', 'r', 'R', 
'east', 'e', 'E', 'left', 'l', 'L', 'west', w', 'W'.
  }
  \item{titles}{
Titles for each of the maps plotted. Optional.
  }
  \item{nbrks}{
Number of breaks to cluster the data in regions, each coloured with one 
different colour. 21 by default (20 colours).
  }
  \item{digits}{
Number of decimal digits to be shown in the labels of the legend.
  }
  \item{color_fun}{
Function to be used to generate the colours. The function is expected to 
receive an integer as single argument and return a vector of valid 
character string colour representations.
  }
  \item{sizeleg}{
Multiplicative factor to increase the size of the legend.
  }
  \item{subsampleg}{
Amount of breaks + 1 to leave unlabelled between two consecutive labels in the
colour bar. 1 by default (all ticks labelled).
  }
}
\examples{
PlotMultiMap(sampleMap$mod[1, , 1, 1, , ], PlotEquiMap, sampleMap$lon, sampleMap$lat)
}
\keyword{dplot}
