Skip to contents

Map layer that draws a network. For more (total) flexibility, please use tm_edges and tm_nodes.

Usage

tm_network()

Value

a tmap::tmap-element, supposed to be stacked after tmap::tm_shape() using the + operator. The opt_<layer_function> function returns a list that should be passed on to the options argument.

Examples

library(tmap)
library(sfnetworks)

sfn = as_sfnetwork(roxel)

tm_shape(sfn) +
  tm_network()

  
tm_shape(sfn) +
  tm_edges(col = "type", lwd = 4) +
  tm_nodes()



tm_shape(sfn) +
  tm_edges(col = "type", lwd = 4, from = 0.3, to = 0.4) +
  tm_nodes()