Repository navigation
Expand file tree
/
Copy pathmf_export.Rd
More file actions
59 lines (52 loc) · 1.59 KB
/
Copy pathmf_export.Rd
File metadata and controls
59 lines (52 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mf_export.R
\name{mf_export}
\alias{mf_export}
\title{Deprecated - Export a map}
\usage{
mf_export(
x,
filename = "map.png",
width,
height,
res = 96,
...,
expandBB = rep(0, 4)
)
}
\arguments{
\item{x}{object of class \code{sf}, \code{sfc} or \code{SpatRaster}}
\item{filename}{path to the exported file. If the file extension is ".png" a
png graphic device is opened, if the file extension is ".svg" a svg graphic
device is opened.}
\item{width}{width of the figure (pixels for png, inches for svg)}
\item{height}{height of the figure (pixels for png, inches for svg)}
\item{res}{resolution (for png)}
\item{...}{further parameters for png or svg export}
\item{expandBB}{fractional values to expand the bounding box with, in each
direction (bottom, left, top, right)}
}
\value{
No return value, a map file is initiated (in PNG or SVG format).
}
\description{
This function is deprecated. Please use \code{\link{mf_png}} or
\code{\link{mf_svg}} instead.
Export a map with the extent of a spatial object.\cr
The map is exported in PNG or SVG format.\cr
If only one of \code{width} or \code{height} is set, \code{mf_export} uses
the width/height ratio of \code{x} bounding box to find a matching ratio for
the export.\cr
Always use \code{add = TRUE} in \code{mf_map} calls following an
\code{mf_export} call.\cr
Use \code{dev.off} to finish the export (see Examples).
}
\examples{
mtq <- mf_get_mtq()
(filename <- tempfile(fileext = ".png"))
mf_png(mtq, filename = filename)
mf_map(mtq)
mf_title()
dev.off()
}
\keyword{internal}