Graph::Easy - Manual

Attributes

If you haven't done so, please read the Overview first.

This chapter describes all the possible attributes for graphs, groups, nodes and edges. It is generated automatically from the definitions in Graph::Easy::Attributes.

Graphs

Nodes

Edges

Groups


Class names

Each of the primary classes node, edge and group can have an arbitrary number of sub-classes.

Subclass names are restricted to [a-z] (lower ASCII letters A to Z) and the _ (underscore). Each subclass can have its own set of attributes.
Objects with their class-attributes set will use the attributes from the appropriate subclass. If an attribute was not defined there, they will inherit the attribute from their primary class. In the following example the left node will have green text, the right one will have red text. Both nodes will have a beige interieur:

node { color: green; fill: beige; }
node.cities { color: red; }

[ Green ] --> [ Red ] { class: cities; }
Example of classes

Labels, Titles and Names

The label is the text displayed for the node, edge etc. It can be different from the name of the object.

Edges do not have a name, but they can have a label. If you try to access the name of an edge, for instance via the autotitle: name; attribute, than the optional edge label will be used instead.

Apart from setting a label manually via the label: Foo; attribute, you can also set labels for entire classes, or use the autolabel: attribute. The latter has the advantage that it can shorten the label automaticall to sane values. See this graph for an example.

Links and URLs

Links are constructed from two parts, by concatenating the linkbase attribute and the link attribute:

node { linkbase: http://bloodgate.com/perl/; }

[ Graph ] { link: graph/; }
 --> [ Manual ] { link: graph/manual/; }
Graph Manual

linkbase is ignored unless you also have link or autolink. You can use autolink to automatically set the link attribute to the name, label, or titel of the object:

node { linkbase: http://bloodgate.com/perl/; autolink: name; }

[ graph ] --> [ graph/manual ]
graph graph/manual Example of links

Note that link has precedence over autolink, the latter will not override a link attribute on the object itself.
Also, linnkbase is only prepended for relativ links, e.g. ones that do not start with /[a-z]{3,4}://. In the following example the first node will not have the name autolinked, and the second node will ignore the linkbase:

node { linkbase: http://bloodgate.com/perl/; autolink: name; }

[ graph ] { link: index.html; } 
  --> [ graph/manual ] { link: http://bloodgate.com; }
graph graph/manual Example of lins

Of course you can also attach a link to an edge, group or graph label.

Color Names and Values

The following color schemes are recognized by Graph::Easy. This lists all the colors known under each scheme, and their corrosponding color values. Note that the w3c scheme is exactly the same as the one published by W3C. So do not blame me for silly things like darkseagreen being lighter than seagreen ...

 

w3c color scheme:
black  darkgreen  midnightblue  darkslategray  darkslategrey  maroon  green  navy 
darkblue  darkred  darkolivegreen  forestgreen  indigo  saddlebrown  darkslateblue  seagreen 
brown  purple  teal  olive  olivedrab  dimgray  firebrick  sienna 
darkcyan  darkmagenta  mediumblue  limegreen  mediumseagreen  gray  grey  slategrey 
slategray  darkgoldenrod  crimson  steelblue  chocolate  lightslategray  lightslategrey  mediumvioletred 
indianred  cadetblue  slateblue  lightseagreen  peru  red  lime  blue 
royalblue  darkviolet  darkorchid  yellowgreen  orangered  blueviolet  goldenrod  rosybrown 
darkseagreen  lawngreen  tomato  darkkhaki  springgreen  chartreuse  mediumaquamarine  mediumpurple 
palevioletred  mediumslateblue  darkorange  darkgray  darkgrey  darkturquoise  mediumspringgreen  mediumorchid 
dodgerblue  deeppink  mediumturquoise  darksalmon  salmon  orange  sandybrown  tan 
turquoise  lightgreen  burlywood  deepskyblue  lightsalmon  orchid  lightsteelblue  inherit 
coral  cornflowerblue  lightcoral  greenyellow  hotpink  palegreen  silver  gold 
skyblue  lightskyblue  plum  aquamarine  lightblue  thistle  cyan  aqua 
fuchsia  yellow  magenta  khaki  violet  lightgrey  lightgray  powderblue 
lightpink  palegoldenrod  wheat  pink  paleturquoise  navajowhite  gainsboro  peachpuff 
moccasin  bisque  blanchedalmond  antiquewhite  papayawhip  mistyrose  lavender  beige 
lightgoldenrodyellow  lemonchiffon  linen  cornsilk  oldlace  whitesmoke  honeydew  lightcyan 
lightyellow  seashell  lavenderblush  aliceblue  floralwhite  mintcream  azure  ivory 
ghostwhite  snow  white 
x11 color scheme:
gray0  black  grey0  grey1  gray1  grey2  gray2  gray3 
grey3  gray4  grey4  gray5  grey5  gray6  grey6  gray7 
grey7  grey8  gray8  grey9  gray9  gray10  grey10  grey11 
gray11  grey12  gray12  grey13  gray13  grey14  gray14  gray15 
grey15  gray16  grey16  gray17  grey17  gray18  grey18  gray19 
grey19  gray20  grey20  gray21  grey21  gray22  grey22  darkgreen 
grey23  gray23  grey24  gray24  grey25  gray25  gray26  grey26 
midnightblue  gray27  grey27  darkslategrey  darkslategray  gray28  grey28  navy 
navyblue  gray29  grey29  gray30  grey30  grey31  gray31  green4 
red4  blue4  grey32  gray32  firebrick4  orangered4  darkolivegreen  grey33 
gray33  forestgreen  brown4  indigo  gray34  grey34  tomato4  gray35 
grey35  springgreen4  darkorange4  chartreuse4  chocolate4  saddlebrown  royalblue4  coral4 
grey36  gray36  dodgerblue4  sienna4  deeppink4  indianred4  gray37  grey37 
violetred4  purple4  orange4  slateblue4  darkslateblue  grey38  gray38  salmon4 
seagreen4  seagreen  tan4  gray39  grey39  darkgoldenrod4  maroon4  deepskyblue4 
goldenrod4  brown  gray40  grey40  lightsalmon4  darkorchid4  olivedrab4 
steelblue4  hotpink4  olivedrab  gold4  palevioletred4  mediumpurple4  grey41  gray41 
dimgray  dimgrey  palegreen4  firebrick  grey42  gray42  sienna  darkolivegreen4 
gray43  grey43  mediumorchid4  turquoise4  skyblue4  aquamarine4  grey44  gray44 
lightpink4  cyan4  magenta4  yellow4  10  gray45  grey45  burlywood4 
pink4  12  grey46  gray46  darkseagreen4  rosybrown4  lightgoldenrod4  green3 
red3  mediumblue  blue3  maroon  navajowhite4  orchid4  grey47  gray47 
khaki4  lightskyblue4  peachpuff4  cadetblue4  gray48  grey48  firebrick3  orangered3 
darkslategray4  wheat4  slategray4  bisque4  lightsteelblue4  grey49  gray49  limegreen 
brown3  lightblue4  gray50  grey50  mediumseagreen  plum4  paleturquoise4 
slategrey  slategray  mistyrose4  lemonchiffon4  gray51  grey51  antiquewhite4  tomato3 
darkgoldenrod  cornsilk4  crimson  darkorange3  chartreuse3  springgreen3  grey52 
gray52  chocolate3  lightyellow4  lightcyan4  honeydew4  thistle4  seashell4  steelblue 
royalblue3  lavenderblush4  grey53  gray53  coral3  azure4  ivory4  chocolate 
dodgerblue3  lightslategray  lightslategrey  sienna3  deeppink3  indianred3  blue2  green2 
red2  snow4  grey54  gray54  mediumvioletred  grey55  gray55  violetred3 
indianred  purple3  cadetblue  orange3  firebrick2  orangered2  slateblue3  grey56 
gray56  slateblue  lightseagreen  salmon3  seagreen3  gray57  grey57  brown2 
peru  tan3  darkgoldenrod3  maroon3  violetred  blue1  green  red1 
red  green1  blue  gray58  grey58  deepskyblue3  royalblue  darkviolet 
goldenrod3  grey59  gray59  darkorchid  darkorchid3  olivedrab3  yellowgreen  lightsalmon3 
tomato2  firebrick1  orangered  orangered1  steelblue3  gray60  grey60  chartreuse2 
springgreen2  darkorange2  palevioletred3  mediumpurple3  chocolate2  gold3  blueviolet  hotpink3 
palegreen3  gray61  grey61  brown1  royalblue2  coral2  gray62  grey62 
dodgerblue2  sienna2  deeppink2  goldenrod  rosybrown  darkseagreen  indianred2  darkolivegreen3 
gray63  grey63  lawngreen  purple2  violetred2  grey64  gray64  tomato1 
tomato  orange2  darkkhaki  turquoise3  mediumorchid3  darkorange1  springgreen 
chartreuse1  springgreen1  chartreuse  skyblue3  mediumaquamarine  aquamarine3  mediumpurple  palevioletred 
slateblue2  chocolate1  mediumslateblue  grey65  gray65  salmon2  lightpink3  cyan3 
magenta3  yellow3  royalblue1  purple  darkorange  seagreen2  grey66  gray66 
coral1  tan2  darkturquoise  mediumspringgreen  mediumorchid  burlywood3  dodgerblue  dodgerblue1 
darkgoldenrod2  maroon2  sienna1  deeppink1  deeppink  indianred1  coral  grey67 
gray67  pink3  deepskyblue2  cornflowerblue  grey68  gray68  rosybrown3  darkseagreen3 
goldenrod2  lightcoral  mediumturquoise  lightgoldenrod3  purple1  violetred1  darksalmon  darkorchid2 
lightsalmon2  salmon  olivedrab2  orange  orange1  grey69  gray69  navajowhite3 
orchid3  khaki3  slateblue1  steelblue2  peachpuff3  lightslateblue  lightskyblue3  sandybrown 
salmon1  cadetblue3  hotpink2  tan  gray70  grey70  palevioletred2  mediumpurple2 
gold2  greenyellow  seagreen1  turquoise  palegreen2  gray71  grey71  tan1 
darkslategray3  wheat3  darkgoldenrod1  maroon1  slategray3  bisque3  lightsteelblue3 
burlywood  deepskyblue1  deepskyblue  gray72  grey72  lightblue3  darkolivegreen2  goldenrod1 
gray73  grey73  darkorchid1  lightsalmon1  lightsalmon  olivedrab1  orchid  paleturquoise3 
plum3  grey74  gray74  mistyrose3  hotpink  steelblue1  turquoise2  palegreen 
mediumorchid2  skyblue2  grey75  gray75  hotpink1  lemonchiffon3  aquamarine2  antiquewhite3 
gray  grey  palevioletred1  mediumpurple1  gold1  gold  palegreen1 
lightpink2  grey76  gray76  yellow2  cyan2  magenta2  cornsilk3 
grey77  gray77  skyblue  lightyellow3  lightcyan3  burlywood2  honeydew3  thistle3 
seashell3  lavenderblush3  darkolivegreen1  lightsteelblue  grey78  gray78  pink2 
gray79  grey79  azure3  ivory3  darkseagreen2  rosybrown2  lightgoldenrod2 
lightgoldenrod  snow3  lightskyblue  plum  gray80  grey80  turquoise1  navajowhite2 
mediumorchid1  skyblue1  orchid2  aquamarine  aquamarine1  khaki2  peachpuff2  lightskyblue2 
grey81  gray81  cadetblue2  lightblue  lightpink1  thistle  magenta1  magenta 
cyan1  yellow  yellow1  cyan  khaki  violet  gray82  grey82 
darkslategray2  lightgrey  lightgray  burlywood1  wheat2  powderblue  grey83  gray83 
slategray2  lightpink  bisque2  lightsteelblue2  pink1  grey84  gray84  lightblue2 
palegoldenrod  darkseagreen1  rosybrown1  lightgoldenrod1  grey85  gray85  wheat  pink 
plum2  paleturquoise2  grey86  gray86  paleturquoise  navajowhite  navajowhite1  orchid1 
gainsboro  khaki1  mistyrose2  peachpuff  peachpuff1  lightskyblue1  lemonchiffon2  gray87 
grey87  antiquewhite2  cadetblue1  moccasin  gray88  grey88  cornsilk2  darkslategray1 
wheat1  11  grey89  gray89  slategray1  bisque1  bisque  lightsteelblue1 
lightcyan2  lightyellow2  honeydew2  gray90  grey90  thistle2  seashell2  lightblue1 
lavenderblush2  grey91  gray91  blanchedalmond  azure2  ivory2  antiquewhite  plum1 
paleturquoise1  snow2  grey92  gray92  papayawhip  mistyrose  mistyrose1  lavender 
beige  gray93  grey93  lightgoldenrodyellow  lemonchiffon  lemonchiffon1  antiquewhite1  grey94 
gray94  linen  cornsilk1  cornsilk  grey95  gray95  oldlace  gray96 
whitesmoke  grey96  honeydew  honeydew1  lightcyan1  lightcyan  lightyellow  lightyellow1 
thistle1  seashell1  seashell  lavenderblush1  lavenderblush  gray97  grey97  aliceblue 
floralwhite  gray98  grey98  mintcream  azure  ivory  azure1  ivory1 
ghostwhite  snow1  snow  grey99  gray99  transparent  grey100  white 
gray100 

ColorBrewer schemes:

accent3 color scheme:
accent4 color scheme:
accent5 color scheme:
accent6 color scheme:
accent7 color scheme:
accent8 color scheme:
blues3 color scheme:
blues4 color scheme:
blues5 color scheme:
blues6 color scheme:
blues7 color scheme:
blues8 color scheme:
blues9 color scheme:
brbg10 color scheme:
10 
brbg11 color scheme:
10  11 
brbg3 color scheme:
brbg4 color scheme:
brbg5 color scheme:
brbg6 color scheme:
brbg7 color scheme:
brbg8 color scheme:
brbg9 color scheme:
bugn3 color scheme:
bugn4 color scheme:
bugn5 color scheme:
bugn6 color scheme:
bugn7 color scheme:
bugn8 color scheme:
bugn9 color scheme:
bupu3 color scheme:
bupu4 color scheme:
bupu5 color scheme:
bupu6 color scheme:
bupu7 color scheme:
bupu8 color scheme:
bupu9 color scheme:
dark23 color scheme:
dark24 color scheme:
dark25 color scheme:
dark26 color scheme:
dark27 color scheme:
dark28 color scheme:
gnbu3 color scheme:
gnbu4 color scheme:
gnbu5 color scheme:
gnbu6 color scheme:
gnbu7 color scheme:
gnbu8 color scheme:
gnbu9 color scheme:
greens3 color scheme:
greens4 color scheme:
greens5 color scheme:
greens6 color scheme:
greens7 color scheme:
greens8 color scheme:
greens9 color scheme:
greys3 color scheme:
greys4 color scheme:
greys5 color scheme:
greys6 color scheme:
greys7 color scheme:
greys8 color scheme:
greys9 color scheme:
oranges3 color scheme:
oranges4 color scheme:
oranges5 color scheme:
oranges6 color scheme:
oranges7 color scheme:
oranges8 color scheme:
oranges9 color scheme:
orrd3 color scheme:
orrd4 color scheme:
orrd5 color scheme:
orrd6 color scheme:
orrd7 color scheme:
orrd8 color scheme:
orrd9 color scheme:
paired10 color scheme:
10 
paired11 color scheme:
10  11 
paired12 color scheme:
10  11  12 
paired3 color scheme:
paired4 color scheme:
paired5 color scheme:
paired6 color scheme:
paired7 color scheme:
paired8 color scheme:
paired9 color scheme:
pastel13 color scheme:
pastel14 color scheme:
pastel15 color scheme:
pastel16 color scheme:
pastel17 color scheme:
pastel18 color scheme:
pastel19 color scheme:
pastel23 color scheme:
pastel24 color scheme:
pastel25 color scheme:
pastel26 color scheme:
pastel27 color scheme:
pastel28 color scheme:
piyg10 color scheme:
10 
piyg11 color scheme:
10  11 
piyg3 color scheme:
piyg4 color scheme:
piyg5 color scheme:
piyg6 color scheme:
piyg7 color scheme:
piyg8 color scheme:
piyg9 color scheme:
prgn10 color scheme:
10 
prgn11 color scheme:
10  11 
prgn3 color scheme:
prgn4 color scheme:
prgn5 color scheme:
prgn6 color scheme:
prgn7 color scheme:
prgn8 color scheme:
prgn9 color scheme:
pubu3 color scheme:
pubu4 color scheme:
pubu5 color scheme:
pubu6 color scheme:
pubu7 color scheme:
pubu8 color scheme:
pubu9 color scheme:
pubugn3 color scheme:
pubugn4 color scheme:
pubugn5 color scheme:
pubugn6 color scheme:
pubugn7 color scheme:
pubugn8 color scheme:
pubugn9 color scheme:
puor10 color scheme:
10 
puor11 color scheme:
10  11 
puor3 color scheme:
puor4 color scheme:
puor5 color scheme:
puor6 color scheme:
puor7 color scheme:
puor8 color scheme:
puor9 color scheme:
purd3 color scheme:
purd4 color scheme:
purd5 color scheme:
purd6 color scheme:
purd7 color scheme:
purd8 color scheme:
purd9 color scheme:
purples3 color scheme:
purples4 color scheme:
purples5 color scheme:
purples6 color scheme:
purples7 color scheme:
purples8 color scheme:
purples9 color scheme:
rdbu10 color scheme:
10 
rdbu11 color scheme:
10  11 
rdbu3 color scheme:
rdbu4 color scheme:
rdbu5 color scheme:
rdbu6 color scheme:
rdbu7 color scheme:
rdbu8 color scheme:
rdbu9 color scheme:
rdgy10 color scheme:
10 
rdgy11 color scheme:
10  11 
rdgy3 color scheme:
rdgy4 color scheme:
rdgy5 color scheme:
rdgy6 color scheme:
rdgy7 color scheme:
rdgy8 color scheme:
rdgy9 color scheme:
rdpu3 color scheme:
rdpu4 color scheme:
rdpu5 color scheme:
rdpu6 color scheme:
rdpu7 color scheme:
rdpu8 color scheme:
rdpu9 color scheme:
rdylbu10 color scheme:
10 
rdylbu11 color scheme:
10  11 
rdylbu3 color scheme:
rdylbu4 color scheme:
rdylbu5 color scheme:
rdylbu6 color scheme:
rdylbu7 color scheme:
rdylbu8 color scheme:
rdylbu9 color scheme:
rdylgn10 color scheme:
10 
rdylgn11 color scheme:
10  11 
rdylgn3 color scheme:
rdylgn4 color scheme:
rdylgn5 color scheme:
rdylgn6 color scheme:
rdylgn7 color scheme:
rdylgn8 color scheme:
rdylgn9 color scheme:
reds3 color scheme:
reds4 color scheme:
reds5 color scheme:
reds6 color scheme:
reds7 color scheme:
reds8 color scheme:
reds9 color scheme:
set13 color scheme:
set14 color scheme:
set15 color scheme:
set16 color scheme:
set17 color scheme:
set18 color scheme:
set19 color scheme:
set23 color scheme:
set24 color scheme:
set25 color scheme:
set26 color scheme:
set27 color scheme:
set28 color scheme:
set310 color scheme:
10 
set311 color scheme:
10  11 
set312 color scheme:
10  11  12 
set33 color scheme:
set34 color scheme:
set35 color scheme:
set36 color scheme:
set37 color scheme:
set38 color scheme:
set39 color scheme:
spectral10 color scheme:
10 
spectral11 color scheme:
10  11 
spectral3 color scheme:
spectral4 color scheme:
spectral5 color scheme:
spectral6 color scheme:
spectral7 color scheme:
spectral8 color scheme:
spectral9 color scheme:
ylgn3 color scheme:
ylgn4 color scheme:
ylgn5 color scheme:
ylgn6 color scheme:
ylgn7 color scheme:
ylgn8 color scheme:
ylgn9 color scheme:
ylgnbu3 color scheme:
ylgnbu4 color scheme:
ylgnbu5 color scheme:
ylgnbu6 color scheme:
ylgnbu7 color scheme:
ylgnbu8 color scheme:
ylgnbu9 color scheme:
ylorbr3 color scheme:
ylorbr4 color scheme:
ylorbr5 color scheme:
ylorbr6 color scheme:
ylorbr7 color scheme:
ylorbr8 color scheme:
ylorbr9 color scheme:
ylorrd3 color scheme:
ylorrd4 color scheme:
ylorrd5 color scheme:
ylorrd6 color scheme:
ylorrd7 color scheme:
ylorrd8 color scheme:
ylorrd9 color scheme:

For all other colors you can use one of the following notations:

Note that mixing the different ways to express the red, green and blue channels is possible, so rgb(0, 50%,0.5) is a valid color.