Below are the basics of the package.
sg_get_are helpers that do not take a
sigmajsobject as input.
The variable names must follow sigma.js convention.
Nodes must ideally include, at least:
idunique id of node, note that this does not have to be numerical
sizesize of node
colorcolor of node
These are passed to
sg_nodes. Note that sigma.js requires passing
y, if omitted the function will randomly assign x and y positions.
Edges must include, at least:
idunique id of edge
sourcesource of edge
targettarget of edge
target refer to the nodes
Remember to always follow the naming convention.
The package comes with two convenience functions to generate data, mainly to be used for testing.
sg_make_nodesto generate nodes, you can specify the number of nodes you want.
sg_make_edgesto generate edges based on the nodes, you can specify the number of edges you want.
Above I state that you must ideally pass
color to the nodes. I say “ideally” because, you actually can omit
color if you then pass default color using
There a lot of settings to pass, see the official wiki for a list of all settings.
Or as stated in the Settings section, you can omit
color but you then must pass defaults using