Graphviz Drawing Flowchart

Source: Internet
Author: User

The gaze description is very specific. No longer detailed.

Digraph G{//dot is a drawing language that allows you to express some ideas quickly and intuitively in a graphical way, such as describing a solution to a problem, conceiving a procedure, and clarifying the connection between a bunch of seemingly scattered, non-chapter things ... Wait a minute.

Anyway, when you're going to use a pencil to scribble some circles around the paper and tie them up with some lines with arrows. It's best to consider using dot to finish the job. digraph is a command that DOT uses to define a graph, where it defines a forward graph called G, and the contents of the curly braces are the contents of the graph, that is, the nodes and edges. The '-a ' symbol indicates a forward edge, which points from a node to a node. Graph is a command that DOT uses to define a graph without a direction. The '--' symbol indicates no edge.

1. Define a diagram and add the required vertex and edge//2 to the diagram. Joins the style//3 for vertices and edges. Use the layout engine to draw//"1" Graph properties//The name of the vertex variable in the text of the default vertex, the shape of the ellipse; The default style for edges is a solid black arrow. Label = "The property setting of the Graph Demo sample";//label fontsize = 10;//font Size fontname = "Microsoft Yahei";//font name//default node attribute node [shape = Mrecord, style = Filled, FillColor = ". 7.3 1.0", color = green, FontSize = 10];//default Edge property edge [Arrowsize =. 5]; The arrows are the original 0.5//"1" declaration node Ida[shape = component, color = green]; The shape is component border color is Greenb[shape = polygon, sides = 5, peripheries = 3]; Polygon has five edges 3 border C[shape = polygon, sides = 4, skew = 0.4, label= "CC"]; Polygons have four-sided tilt angles of 0.4 label text for ccd;e;f[shape = circle, color = red, style = solid]; The circular border color is red//"2" to construct the connection relationship. The attribute a->b[color= "red" used to define the edge in the following []; Side for red A->c[style = dashed]; Edge for dashed A->d[style = bold, label= "Times"]; Edge Bold, line label is timesb->e; e->{f; d}; Connect two b->s0[arrowhead at the same time = "normal", Dir=both]; Side arrow type is normal type, bearing is bidirectional//[3] node grouping--The name of the subgraph//sub-chart must start with cluster, otherwise Graphviz cannot be set. Subgraph Cluster_1{label = "Process 1";//Sub-graph label bgcolor= "Mintcream";Background color s0->s1->s2; of the sub-chart Construct connection relationship};//[4] record of multiple data shape = "Record"//use ' | ' Cut data ' \l ' newline Animal[label = ' {Animal | + name:string\l+ age:int\l |+ die (): void\l} ", shape =" Record "];subgraph Clusteranimalimpl{bgcolor =" Yellow ";D og[l Abel = "{dog| |+ bark (): void\l}", shape = "record"]; Cat[label = "{cat| |+ meow (): void\l}", shape = "record"];}; Edge[arrowhead = "Empty"];D og->animal; Cat->animal;dog->cat[arrowhead= "None", label= "0..*"];}




Many other references:

After installing the Graphviz software, in the installation folder of the. \graphviz\share\graphviz\doc\html, get lots of other references.



Graphviz Drawing Flowchart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.