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.

Classic World MapBubble MapBubble MapWorld facetsUS ChoroplethUS ChoroplethLondon CrimesLondon CrimesLondon CrimesLondon Crimes

See below the source code for these images.

@@ -221,7 +220,7 @@

Developers

Dev status

diff --git a/reference/tm_facets.html b/reference/tm_facets.html index 74378f89..424346c2 100644 --- a/reference/tm_facets.html +++ b/reference/tm_facets.html @@ -92,7 +92,8 @@

Usage textNA = "Mssing", scale.factor = 2, type = NA, - along = NULL + along = NULL, + free.scales = NULL ) tm_facets_grid(rows = NULL, columns = NULL, pages = NULL, ...) @@ -212,6 +213,10 @@

ArgumentsUsage fontface.legend = tm_legend(), fontface.free = NA, fontfamily = "", + bgcol = tm_const(), + bgcol.scale = tm_scale(), + bgcol.legend = tm_legend(), + bgcol.free = NA, + bgcol_alpha = tm_const(), + bgcol_alpha.scale = tm_scale(), + bgcol_alpha.legend = tm_legend(), + bgcol_alpha.free = NA, shadow = FALSE, plot.order = tm_plot_order("AREA", reverse = FALSE, na.order = "bottom"), trans.args = list(points.only = "ifany"), @@ -125,6 +133,16 @@

Argumentsgpar() for details.

+
bgcol, bgcol.scale, bgcol.legend, bgcol.free
+

Visual variable that determines +the background color. See Details.

+ + +
bgcol_alpha, bgcol_alpha.scale, bgcol_alpha.legend, bgcol_alpha.free
+

Visual variable that determines +the background color transparency. See Details.

+ +
shadow

Shadow behind the text. Logical or color.

@@ -188,45 +206,21 @@

Details

Examples

-
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.
+