Graphviz: Difference between revisions

From Fundamental Ramen
Jump to navigation Jump to search
Line 4: Line 4:
rankdir=TB;
rankdir=TB;


A [label="A | <1> P1 | <2> P2"];
A [label="Vigor 2926 | { <1> P1 | <2> P2" }];
B [label="B"];
B [label="B"];
</quickgv>
</quickgv>

Revision as of 08:11, 21 April 2021

Beautify Edges

Error: : syntax error in line 53 near '}'

digraph test0 {

	// options
	// theme = warm
	// usage = record

	// default settings of graphs
	graph [
		rankdir   = LR,
		color     = "#804000",
		bgcolor   = "#fffff7",
		fontcolor = "#000000",
		fontsize  = 12,
		style     = dashed,
		gradientangle = 65,

		
		
				// * ortho, curved are bad
		// * polyline acts as line
		// * spline (default) is ok
		splines = spline,
			];

	// default settings of nodes
	node [
				shape = record,
		style = filled,
		labelloc = l,
		
		height    = 0.3,
		fontsize  = 10,
		
		// theme
		color     = "#c07000",
		fontcolor = "#000000",
		fillcolor = "#ffffff:#ffffc0",
		gradientangle = 295 // left, top -> right, bottom
	];

	// default settings of edges
	edge [
		color     = "#704000",
		fontcolor = "#704000",
		fontsize  = 10,
		arrowsize = 0.6
	];

	
	// nodes, edges, and clusters
	rankdir=TB;

A [label="Vigor 2926 | { <1> P1 | <2> P2" }];
B [label="B"];
	
}

Order

GDS

Edge Attributes

label arrow other
  • URL labelURL headURL tailURL edgeURL
  • lp head_lp tail_lp xlp
  • headclip tailclip
  • href headhref tailhref edgehref labelhref
  • label headlabel taillabel xlabel
  • headport tailport
  • headtarget tailtarget edgetarget labeltarget
  • headtooltip tailtooltip edgetooltip labeltooltip
  • label_scheme
  • labelangle
  • labeldistance
  • labelfloat
  • labelfontcolor
  • labelfontname
  • labelfontsize

arrowhead arrowsize arrowtail color colorscheme comment constraint decorate dir fillcolor fontcolor fontname fontsize id len lhead ltail minlen nojustify penwidth pos samehead sametail showboxes target tooltip weight

Edge label

All kinds of labels

label xlabel headlabel taillabel

Difference between label and xlabel 1

Attribute label works not good as expected while using in subgraph.

label xlabel label in subgraph xlabel in subgraph

Difference between label and xlabel 2 (constraint=false)

  • The label is gone.
  • Space of xlabel is not enough.
label

xlabel

xlabel
with minlen=4

label
in subgraph

xlabel
in subgraph

xlabel
in subgraph
with minlen=4

Direction of subgraph

Position of xlabel