\name{GenBrksCols}
\alias{GenBrksCols}
\title{Generate Colours and Breaks}
\description{
Generates breaks and colours to be used in legends of map plots, taking
a data array as inputs. Takes by default the colour palette defined in 
\code{clim.colours()}.
}
\usage{
GenBrksCols(var, nbrks = 21, digits = 2, color_fun = clim.colors)
}
\arguments{
  \item{var}{
Numeric array of data the breaks and colours for which have to be generated.
  }
  \item{nbrks}{
Number of breaks (number of colours + 1) to be generated.
  }
  \item{digits}{
Number of decimal digits to be kept for the values of the breaks.
  }
  \item{color_fun}{
Function that receives as only argument a number N of colours to be generated,
and gives as output a character vector with N colours.
  }
}
\examples{
bc <- GenBrksCols(sampleMap$mod, 101, 1)
ColorBar(bc$brks, bc$cols)
}
\keyword{datagen}
