Skip to contents

Write the SVG of a flow map to a file

Usage

write_svg(x, file, schematic = FALSE)

Arguments

x

A milkflow object from flowmap().

file

Path of the file to write.

schematic

Write the schematic layout instead of the geographic one; an error when there is none.

Value

file, invisibly.

Examples

m <- flowmap(demo_nodes, demo_flows)
f <- tempfile(fileext = ".svg")
write_svg(m, f)
file.size(f) > 0
#> [1] TRUE
unlink(f)