Skip to content

GraphPlot ​

Wolfram's own GraphPlot, held inert -- the expression is what a worksheet or REPL draws, not something this library computes (see @enumeratio/formats/src/graphics.ts).

Wolfram LanguageGraphPlot
GraphPlot(...)Wolfram's own GraphPlot, held inert -- the expression is what a worksheet or REPL draws, not something this library computes (see @enumeratio/formats/src/graphics.ts).
Typed signatures
TypePackageApplies
(any*) -> anyformatsalways

Domain: Graphics·Drawn as Graphics

Examples

Basic #

An undirected graph on a circular layout

live ↗
InGraphPlot({edges→[List,[List,’a’,’b’],[List,’b’,’c’],[List,’c’,’d’],[List,’d’,’a’],[List,’a’,’c’]]})\mathrm{GraphPlot}(\left\lbrace \text{edges}→\bigl\lbrack\text{List}, \bigl\lbrack\text{List}, \text{'a'}, \text{'b'}\bigr\rbrack, \bigl\lbrack\text{List}, \text{'b'}, \text{'c'}\bigr\rbrack, \bigl\lbrack\text{List}, \text{'c'}, \text{'d'}\bigr\rbrack, \bigl\lbrack\text{List}, \text{'d'}, \text{'a'}\bigr\rbrack, \bigl\lbrack\text{List}, \text{'a'}, \text{'c'}\bigr\rbrack\bigr\rbrack\right\rbrace)OutGraphPlot({edges→[[a,b],[b,c],[c,d],[d,a],[a,c]]})\mathrm{GraphPlot}(\left\lbrace \text{edges}→\bigl\lbrack\bigl\lbrack\text{a}, \text{b}\bigr\rbrack, \bigl\lbrack\text{b}, \text{c}\bigr\rbrack, \bigl\lbrack\text{c}, \text{d}\bigr\rbrack, \bigl\lbrack\text{d}, \text{a}\bigr\rbrack, \bigl\lbrack\text{a}, \text{c}\bigr\rbrack\bigr\rbrack\right\rbrace)

Directed: an arrowhead on each edge

live ↗
InGraphPlot({edges→[List,[List,’a’,’b’],[List,’b’,’c’],[List,’c’,’a’]]},(Directed,True))\mathrm{GraphPlot}(\left\lbrace \text{edges}→\bigl\lbrack\text{List}, \bigl\lbrack\text{List}, \text{'a'}, \text{'b'}\bigr\rbrack, \bigl\lbrack\text{List}, \text{'b'}, \text{'c'}\bigr\rbrack, \bigl\lbrack\text{List}, \text{'c'}, \text{'a'}\bigr\rbrack\bigr\rbrack\right\rbrace, (\mathrm{Directed},\mathrm{True}))OutGraphPlot({edges→[[a,b],[b,c],[c,a]]},(Directed,True))\mathrm{GraphPlot}(\left\lbrace \text{edges}→\bigl\lbrack\bigl\lbrack\text{a}, \text{b}\bigr\rbrack, \bigl\lbrack\text{b}, \text{c}\bigr\rbrack, \bigl\lbrack\text{c}, \text{a}\bigr\rbrack\bigr\rbrack\right\rbrace, (\mathrm{Directed},\mathrm{True}))
About
Examples2
CrosswalkWolfram Language