This function set a map theme.
The parameters set by this function are the figure margins, background and
foreground colors and some mf_title options.
Use mf_theme('default')
to reset to default theme settings.
mf_theme(x = "default", bg, fg, mar, tab, pos, inner, line, cex, font)
name of a map theme. One of "default", "brutal", "ink", "dark", "agolalight", "candy", "darkula", "iceberg", "green", "nevermind", "jsk", "barcelona". If x is used other parameters are ignored.
background color
foreground color
margins
if TRUE the title is displayed as a 'tab'
position, one of 'left', 'center', 'right'
if TRUE the title is displayed inside the plot area.
number of lines used for the title
cex of the title
font of the title
The (invisible) list of theme parameters is returned.
It is also possible to set a custom theme using a list of arguments
(see Examples).
mf_theme()
returns the current theme settings.
mtq <- mf_get_mtq()
# built-in theme
mf_theme("green")
mf_map(mtq)
mf_title()
# theme from arguments
mf_theme(
bg = "darkslategrey", fg = "cornsilk3", mar = c(2, 2, 4, 2),
tab = FALSE, pos = "center", inner = FALSE,
line = 2, cex = 2, font = 4
)
mf_map(mtq)
mf_layout()
# theme from list
custom <- list(
name = "custom",
bg = "green",
fg = "red",
mar = c(2, 2, 2, 2),
tab = TRUE,
pos = "center",
inner = TRUE,
line = 2,
cex = 1.5,
font = 3
)
mf_theme(custom)
mf_map(mtq)
mf_title()
(mf_theme("default"))
#> $name
#> [1] "default"
#>
#> $bg
#> [1] "#f7f7f7"
#>
#> $fg
#> [1] "#333333"
#>
#> $mar
#> [1] 0.5 0.5 1.7 0.5
#>
#> $tab
#> [1] TRUE
#>
#> $pos
#> [1] "left"
#>
#> $inner
#> [1] FALSE
#>
#> $line
#> [1] 1.2
#>
#> $cex
#> [1] 1
#>
#> $font
#> [1] 1
#>