sg_export_svg

0th

Percentile

Export

Export graph to SVG.

Usage
sg_export_svg(sg, download = TRUE, file = "graph.svg", size = 1000,
  width = 1000, height = 1000, labels = FALSE, data = FALSE)

sg_export_img(sg, download = TRUE, file = "graph.png", background = "white", format = "png", labels = FALSE)

sg_export_img_p(proxy, download = TRUE, file = "graph.png", background = "white", format = "png", labels = FALSE)

sg_export_svg_p(proxy, download = TRUE, file = "graph.svg", size = 1000, width = 1000, height = 1000, labels = FALSE, data = FALSE)

Arguments
sg

An object of class sigmajsas intatiated by sigmajs.

download

set to TRUE to download.

file

Name of file.

size

Size of the SVG in pixels.

width, height

Width and height of the SVG in pixels.

labels

Whether the labels should be included in the svg file.

data

Whether additional data (node ids for instance) should be included in the svg file.

background

Background color of image.

format

Format of image, takes png, jpg, gif or tiff.

proxy

An object of class sigmajsProxy as returned by sigmajsProxy.

Aliases
  • sg_export_svg
  • sg_export_img
  • sg_export_img_p
  • sg_export_svg_p
Examples
# NOT RUN {
nodes <- sg_make_nodes() 
edges <- sg_make_edges(nodes, 17)

sigmajs() %>% 
  sg_nodes(nodes, id, size) %>% 
  sg_edges(edges, id, source, target) %>% 
  sg_export_svg() %>% 
  sg_button("export_svg", "download")

# demo("export-graph", package = "sigmajs")

# }
Documentation reproduced from package sigmajs, version 0.1.3, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.