library(mapsf)
mf_theme("base")
mtq <- mf_get_mtq()
mtq_p <- mf_get_mtq("points")
mf_map(mtq, expandBB = c(0, .1, 0, .3))
mf_map(mtq_p[c(2, 3, 17, 28), ],
pch = 4, lwd = 1.5, cex = .5, col = "red",
add = TRUE
)
mf_title("Title of the map", banner = TRUE)
mf_frame()
mf_text(x = "topright", txt = "x = 'topright'")
mf_text(
x = "bottomleft",
txt = "x = 'bottomleft'\nadj = c(4,4)\nalign = 'left'",
adj = c(4, 4),
align = "left"
)
mf_text(
x = c(728000, 1625500),
txt = "x = c(X, Y)",
pos = "right",
line = 2,
offset = 5
)
mf_text(
mtq[3, ],
txt = "pos = 'top'\nhalo = TRUE",
pos = "top",
align = "center",
halo = TRUE
)
mf_text(
mtq[3, ],
txt = "pos = 'bottomleft'\nhalo = TRUE\nalign = 'right'",
pos = "bottomleft",
align = "right",
halo = TRUE
)
mf_text(
x = mtq[17, ],
txt = "pos = 'bottomright'\nline = 1\nbox = TRUE",
pos = "bottomright",
offset = 10,
line = 1,
box = TRUE
)
mf_text(
x = mtq[17, ],
txt = "pos = 'topright'\nline = 1\nalign = 'left'",
pos = "topright",
offset = 15,
align = "left",
line = 1
)
mf_text(
x = mtq[2, ],
txt = "pos = 'topleft'\nline = 2\nbox = TRUE\nclockwise = TRUE",
pos = "topleft",
offset = 8,
clockwise = TRUE,
line = 2,
box = TRUE
)
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"
)
mf_text(
x = mtq[28, ],
txt = "pos = 'right'\nline = 3\nbox = TRUE\nclockwise = TRUE",
pos = "right",
offset = 10,
clockwise = TRUE,
line = 3,
box = TRUE
)
Run the code above in your browser using DataLab