Repository navigation
Expand file tree
/
Copy pathmf_annotation.Rd
More file actions
80 lines (70 loc) · 1.72 KB
/
Copy pathmf_annotation.Rd
File metadata and controls
80 lines (70 loc) · 1.72 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mf_annotation.R
\name{mf_annotation}
\alias{mf_annotation}
\title{Deprecated - Plot an annotation}
\usage{
mf_annotation(
x,
txt,
pos = "topright",
cex = 0.8,
col_arrow,
col_txt,
halo = FALSE,
bg,
s = 1,
...
)
}
\arguments{
\item{x}{an sf object with 1 row, a couple of coordinates (c(x, y)) or
"interactive"}
\item{txt}{the text to display}
\item{pos}{position of the text, one of "topleft", "topright", "bottomright",
"bottomleft" or "center"}
\item{cex}{size of the text}
\item{col_arrow}{arrow color, hex code or color name given by \link{colors}.
The default color is the highlight color (see \link{mf_theme}).}
\item{col_txt}{text color, hex code or color name given by \link{colors}.
The default color is the highlight color (see \link{mf_theme}).}
\item{halo}{add a halo around the text}
\item{bg}{halo color, hex code or color name given by \link{colors}.
The default color is the background color (see \link{mf_theme}).}
\item{s}{arrow size (min=1)}
\item{...}{further \link{text} arguments.}
}
\value{
No return value, an annotation is displayed.
}
\description{
This function is deprecated. Please use \link{mf_text} instead.
instead.
Plot an annotation on a map.
}
\note{
Annotations cannot be displayed on unprojected (long/lat) maps.
}
\examples{
mtq <- mf_get_mtq()
mf_map(mtq)
mf_text(
x = mtq[2, ],
txt = "pos = 'bottomleft'\nline = 2\nclockwise = FALSE",
pos = "bottomleft",
offset = 6,
clockwise = FALSE,
line = 2,
box = FALSE
)
mf_text(
x = mtq[28, ],
txt = "pos = 'topright'\nline = 3\nclockwise = FALSE",
pos = "topright",
offset = 10,
clockwise = FALSE,
line = 3,
halo = TRUE,
align = "left"
)
}