plot a network using rough.js

roughnet(
  g,
  roughness = c(1, 1),
  bowing = c(1, 1),
  font = "30px Arial",
  width = NULL,
  height = NULL,
  elementId = NULL
)

Arguments

g

igraph object

roughness

numeric vector for roughness of vertices and edges

bowing

numeric vector for bowing of vertices and edges

font

font size and font family for labels

width

width

height

height

elementId

DOM id

Details

the function recognizes the following attributes Vertex attributes (e.g. V(g)$shape):

  • shape one of "circle", "rectangle", "heart", "air", "earth", "fire", "water"

  • fill vertex fill color

  • color vertex stroke color

  • stroke stroke size

  • fillstyle one of "hachure", "solid", "zigzag", "cross-hatch", "dots", "sunburst", "dashed", "zigzag-line"

  • size vertex size

  • label vertex label

  • pos position of vertex label (c)enter, (n)orth, (e)ast, (s)outh, (w)est

Edge attributes (e.g. E(g)$color):

  • color edge color

  • width edge width

Default values are used if one of the attributes is not found.

The result of a roughnet call can be printed to file with save_roughnet()

More details on roughjs can be found on https://github.com/rough-stuff/rough/wiki