diff --git a/index.html b/index.html index d45644e6..f833833d 100644 --- a/index.html +++ b/index.html @@ -87,7 +87,6 @@ -
tmap
is an actively maintained open-source R-library for drawing thematic maps. The API is based on A Layered Grammar of Graphics and resembles the syntax of ggplot2
, a popular R-library for drawing charts.
See below the source code for these images.
@@ -221,7 +220,7 @@Visual variable that determines +the background color. See Details.
Visual variable that determines +the background color transparency. See Details.
Shadow behind the text. Logical or color.
data(rivers)
-
-tm_shape(rivers) +
- tm_lines()
+ tm_shape(World) +
+ tm_text(text = "name",
+ size = .4,
+ bgcol = "economy")
-tm_shape(rivers) +
- tm_lines(lwd = "scalerank")
-
-
-tm_shape(rivers) +
- tm_lines(lwd = "scalerank",
- lwd.scale = tm_scale_continuous(values.scale = 2, n = 20),
- lwd.legend = tm_legend(orientation = "landscape", item.width = 2),
- col = "type",
- col.scale = tm_scale(values = c("darkblue", "darkred")))
-
-
-tm_shape(rivers) +
- tm_lines(lwd = "scalerank",
- lty = "scalerank",
- col = "scalerank",
- col.scale = tm_scale_categorical(),
- lty.legend = tm_legend_combine("lwd"),
- col.legend = tm_legend_combine("lwd"))
-
-
-
-### tmap3
-
tm_shape(World) +
- tm_fill() +
- tm_shape(rivers) +
- tm_lines(col="black", lwd="scalerank", scale=2, legend.lwd.show = FALSE) +
- tm_style("cobalt", title = "Rivers of the World") +
- tm_format("World")
-#> tm_lines: Deprecated tmap v3 code detected. Code translated to v4
-
-
+ tm_text(text = "name",
+ size = .4,
+ bgcol = "economy",
+ bgcol.scale = tm_scale_categorical(values = cols4all::.P$hcl$cat$set2),
+ bgcol_alpha = "pop_est",
+ bgcol_alpha.scale = tm_scale_intervals(style = "kmeans"))
+#> Warning: (Set of) legends is too high and are therefore rescaled.
+
option | description |
modes | Mode specific options. It is a named list where names correspond to the available modes. Each item is a list of options. |
crs | Map crs (see tm_shape() ). NA means the crs is specified in tm_shape() . The crs that is used by the transformation functions is defined in tm_shape() . |
facet.max | Maximum number of facets |
facet.flip | Should facets be flipped (in case of facet wrap)? This can also be set via tm_facets_flip() |
free.scales | For backward compatibility: if this value is set, it will be used to impute the free arguments in the layer functions |
raster.max.cells | Maximum number of raster grid cells |
show.messages | Show messages? |
show.warnings | Show warnings? |
output.format | Output format |
output.size | Output size |
output.dpi | Output dpi |
output.dpi.animation | Output dpi for animations |
value.const | Default visual value constants e.g. the default fill color for tm_shape(World) + tm_polygons() . A list is required with per visual variable a value. |
value.na | Default visual values that are used to visualize NA data values. A list is required with per visual variable a value. |
value.null | Default visual values that are used to visualize null (out-of-scope) data values. A list is required with per visual variable a value. |
value.blank | Default visual values that correspond to blank. For color these are "#00000000" meaning transparent. A list is required with per visual variable a value. |
values.var | Default values when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. |
values.range | Default range for values. See values.range of tm_scale_categorical() . A list is required with per visual variable a value. |
value.neutral | Default values for when a data variable to mapped to a visual variable, e.g. a color palette. A list is required with per visual variable a value. |
scales.var | Default scales. |
label.format | Format for the labels (was legend.format in tmap v3). |
label.na | Default label for missing values. |
See tm_layout() for layout specific options. |