Snow Flower Text supports drawing of graphs in Dot language. Since Snow Flower Text has a built-in GraphViz compatible engine, You can start using it without any additional installation.
Since this engine is implemented with cross platform technology, there is no difference in rendering result by platform. Also, since the engine is driven by a thread, not a process, it runs at very high speed with low system load, making real-time preview comfortable.
GraphViz ( Graph Visualization Software ) is an open source graph rendering package developed by AT&T Labs Research and draws the graph shown in the DOT language script. |
How to use
By writing dot syntax in the AsciiDoc [graphviz]
block, you can embed the Graph image in the document.
Select AsciiDoc grammar.
Use the
graphviz
block to embed the Graph image. You can insert a Dot template into a document in theMenu
>Insert
>Graph
menu.It is over.
[graphviz]
--------------------------------------------
digraph{
a->b
}
--------------------------------------------
Layout type
In Graphviz you can easily change the layout by changing the layout algorithm.
You can specify an automatic layout algorithm with the layout
attribute of the graphviz
block. The dot layout is the default, but it is recommended to choose an algorithm that is laid out cleanly.
[graphviz]
--------------------------------------------
graph{
graph[layout=Layout]
...
}
--------------------------------------------
- dot
The dot engines are ranked in the direction of the edge. By default, the direction is set from top to bottom.
- neato
The neato engine provides a spring model layout. If the graph is not too large (less than 100 nodes) and you do not know anything else about the characteristics of the graph, this is a good engine.
- twopi
The twopi engine provides a radial layout. Nodes are arranged on concentric circles according to the distance from the given root node.
- circo
circo provides a circular layout. It is suitable for diagrams of multiple annular structures such as certain communication networks.
- fdp
- osage
osage provides a layout of array type.
- patchwork
Node Shapes
[graphviz]
--------------------------------------------
digraph{
a[shape=Shape]
}
--------------------------------------------
Node style
[graphviz]
--------------------------------------------
digraph{
a[style=Style]
}
--------------------------------------------
Arrow Shapes
[graphviz]
--------------------------------------------
digraph{
a -> b[arrowhead=Shape]
}
--------------------------------------------
Font family
If you want to change the font, you can change it by specifying the font name in the fontname
attribute.
digraph {
node [fontname=Font];
...
}
Changing the font name is highly dependent on the system, so careful attention must be paid to how to select fonts, but since there is a font fallback behavior like the web CSS, you can specify multiple fonts just like the web You can solve the dependency with the approach you do. Also, even in environments where there is no specified metrics compatible font, the width of the text is automatically adjusted depending on the display environment.
Here is an example of sans-serif, serif, and monotype.
“Metric compatible font” is a font whose metrics match. The layout of the document will not be lost even if the font is replaced because the metrics (character size) match. |
Helvetica, Arial, Liberation Sans
Times, Times New Roman, Liberation Serif
Courier, Courier New, Liberation Mono
Color names
Whites
■ antiquewhite
■ azure
■ bisque
■ blanchedalmond
■ cornsilk
■ oralwhite
■ gainsboro
■ ghostwhite
■ honeydew
■ ivory
■ lavender
■ lavenderblush
■ lemonchiffon
■ linen
■ mintcream
■ mistyrose
■ moccasin
■ navajowhite
■ oldlace
■ papayawhip
■ peachpuff
■ seashell
■ snow
■ thistle
■ wheat
■ white
■ whitesmoke
Greys
■ darkslategray
■ dimgray
■ gray
■ gray
■ lightgray
■ lightslategray
■ slategray
Blacks
■ black
Reds
■ coral
■ crimson
■ darksalmon
■ deeppink
■ rebrick
■ hotpink
■ indianred
■ lightpink
■ lightsalmon
■ maroon
■ mediumvioletred
■ orangered
■ palevioletred
■ pink
■ red
■ salmon
■ tomato
■ violetred
Browns
■ beige
■ brown
■ burlywood
■ chocolate
■ darkkhaki
■ khaki
■ peru
■ rosybrown
■ saddlebrown
■ sandybrown
■ sienna
■ tan
Oranges
■ darkorange
■ orange
■ orangered
Yellows
■ darkgoldenrod
■ gold
■ goldenrod
■ greenyellow
■ lightgoldenrod
■ lightgoldenrodyellow
■ lightyellow
■ palegoldenrod
■ yellow
■ yellowgreen
Greens
■ chartreuse
■ darkgreen
■ darkolivegreen
■ darkseagreen
■ forestgreen
■ green
■ greenyellow
■ lawngreen
■ lightseagreen
■ limegreen
■ mediumseagreen
■ mediumspringgreen
■ mintcream
■ olivedrab
■ palegreen
■ seagreen
■ springgreen
■ yellowgreen
■ Cyans
■ aquamarine
■ cyan
■ darkturquoise
■ lightcyan
■ mediumaquamarine
■ mediumturquoise
■ paleturquoise
■ turquoise
Blues
■ aliceblue
■ blue
■ blueviolet
■ cadetblue
■ corn
■ owerblue
■ darkslateblue
■ deepskyblue
■ dodgerblue
■ indigo
■ lightblue
■ lightskyblue
■ lightslateblue
■ mediumblue
■ mediumslateblue
■ midnightblue
■ navy
■ navyblue
■ powderblue
■ royalblue
■ skyblue
■ slateblue
■ steelblue
Magentas
■ blueviolet
■ darkorchid
■ darkviolet
■ magenta
■ mediumorchid
■ mediumpurple
■ mediumvioletred
■ orchid
■ palevioletred
■ plum
■ purple
■ violet
■ violetred