% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mf_map_help.R
\name{mf_map_grad}
\alias{mf_map_grad}
\title{Plot graduated symbols}
\arguments{
\item{x}{object of class \code{sf}}

\item{var}{name of the variable to map}

\item{type}{"grad"}

\item{breaks}{either a numeric vector with the actual breaks, or a
classification method name. The main methods are 'quantile',
'equal', 'msd', 'ckmeans' (natural breaks), 'Q6' and 'geom'.
See \link{mf_get_breaks} for details.}

\item{nbreaks}{number of classes}

\item{col}{color of the graduated symbols or lines, a hex code or
a color name given by \link{colors}.
The default color is the highlight color (see \link{mf_theme}).}

\item{border}{border color for symbols, a hex code or
color name given by \link{colors}. The default color is the background color (see
\link{mf_theme}).}

\item{lwd}{border width for graduated symbols, a vector of line widths for
graduated lines}

\item{pch}{type of symbol to use for points, see \link{pch} (points only)}

\item{cex}{a vector of sizes for symbols (points only)}

\item{alpha, expandBB, extent, bg, add}{arguments described in \link{mf_map}}

\item{leg_*}{legend arguments described in \link{mf_map}}
}
\value{
x is (invisibly) returned.
}
\description{
With the \strong{grad} map type, \code{mf_map()} displays graduated symbols on a map.

Graduated symbols are based on classified quantitative variables.

For polygons, centroids are used to plot graduated symbols.
\subsection{Usage}{

For polygons and points:

\if{html}{\out{<div class="sourceCode r">}}\preformatted{mf_map(x, var, type = "grad",
       breaks = "quantile", nbreaks = 3,
       col, border, lwd = 0.7, pch = 21, cex,
       alpha, expandBB, extent, bg, add = TRUE, leg_*)
}\if{html}{\out{</div>}}

For lines:

\if{html}{\out{<div class="sourceCode r">}}\preformatted{mf_map(x, var, type = "grad",
       breaks = "quantile", nbreaks = 3,
       col, lwd,
       alpha, expandBB, extent, bg, add = TRUE, leg_*)
}\if{html}{\out{</div>}}
}
}
\examples{
mtq <- mf_get_mtq()
flows <- mf_get_mtq("lines")
mf_map(mtq, bg = "cornsilk2")
mf_map(flows, "fij", "grad",
  breaks = "geom", nbreaks = 3,
  lwd = c(1, 3, 7),
  leg_title = "N. commuters",
  leg_pos = "bottomleft", leg_val_rnd = 0
)
mf_map(mtq, "POP", "grad",
  breaks = c(686, 5000, 25000, 82502),
  cex = c(1, 2, 4), pch = 22, col = "steelblue",
  leg_title = "Population", leg_pos = "topright",
  leg_frame = TRUE
)
}
\seealso{
\code{\link[=mf_map]{mf_map()}}
}
