forked from digraphs/graphviz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathg_c_n.g
More file actions
30 lines (26 loc) · 980 Bytes
/
Copy pathg_c_n.g
File metadata and controls
30 lines (26 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#############################################################################
##
## g_c_n.g
## Copyright (C) 2024 Matthew Pancer
##
## Licensing information can be found in the README file of this package.
##
#############################################################################
##
# https://graphviz.readthedocs.io/en/stable/examples.html
# https://www.graphviz.org/Gallery/gradient/g_c_n.html
LoadPackage("graphviz");
g := GraphvizGraph("G");
GraphvizSetAttr(g,
"bgcolor=\"purple:pink\" label=\"agraph\" fontcolor=\"white\"");
cluster1 := GraphvizAddSubgraph(g, "cluster1");
GraphvizSetAttr(cluster1, Concatenation(
"fillcolor=\"blue:cyan\" label=\"acluster\" fontcolor=\"white\"",
"style=\"filled\" gradientangle=270\n"));
GraphvizSetAttr(cluster1, Concatenation(
"node [shape=box, fillcolor=\"red:yellow\",",
" style=\"filled\", gradientangle=90]"));
GraphvizAddNode(cluster1, "anode");
Print(AsString(g));
Splash(g);
QUIT;