OSAGE(1)
π¦ osage β filter for drawing clustered graphs π¦
hi bestie!! π welcome to OSAGE(1), aka the General Commands Manual page for osage. grab a lil snack π, get comfy, and let's get into it β no cap.
πΈ NAME πΈ
osage β filter for drawing clustered graphs β¨
π SYNOPSIS π
osage [-(G|N|E)name=value] [-Tlang] [-llibfile] [-ooutfile] [-O] [-P]
[-v] [-V] [files]
π DESCRIPTION π
okay so, osage draws clustered graphs. π as input, it takes any graph in the dot format, and it draws the graph recursively. π
at each level, there will be a collection of nodes and a collection of cluster subgraphs. the internals of each cluster subgraph are laid out, then the cluster subgraphs and nodes at the current level are positioned relative to each other β treating each cluster subgraph as a node. periodt. π
at each level, the nodes and cluster subgraphs are viewed as rectangles to be packed together. π§© at present, edges are ignored during packing. packing is done using the standard packing functions. in particular, the graph attributes pack and packmode control the layout. each graph and cluster can specify its own values for these attributes. remember also that a cluster inherits its attribute values from its parent graph. π«Ά
after all nodes and clusters, edges are routed based on the value of the splines attribute. π
πΌοΈ OUTPUT FORMATS πΌοΈ
osage uses an extensible plugin mechanism for its output renderers, so to see what output formats your installation of osage supports you can use osage -Txxx (where xxx is an unlikely format) and check the warning message. π also, the plugin mechanism supports multiple implementations of the output formats. to see what variants are available, use, for example: osage -Tpng: and to force a particular variant, use, for example: osage -Tpng:gd.
traditionally, osage supports the following:
-Tps(PostScript)-Tsvg-Tsvgz(Structured Vector Graphics)-Tfig(XFIG graphics)-Tmif(FrameMaker graphics)-Thpgl(HP pen plotters)-Tpcl(Laserjet printers)-Tpng-Tgif(bitmap graphics)-Timap(imagemap files for httpd servers for each node or edge that has a non-null"href"attribute.)-Tcmapx(client-side imagemap for use in html and xhtml)
additional less common or more special-purpose output formats can be found at https://www.graphviz.org/doc/info/output.html.
alternative plugins providing support for a given output format can be found from the error message resulting from appending a : to the format. e.g. -Tpng: β the first plugin listed is always the default. β¨
π GRAPH FILE LANGUAGE π
here's a synopsis of the graph file language, normally using the extension .gv, for graphs:
[strict] (graph|digraph) name { statement-list }
is the top level graph. if the graph is strict then multiple edges are not allowed between the same pairs of nodes. if it's a directed graph, indicated by digraph, then the edgeop must be "->". if it's an undirected graph then the edgeop must be "--". statements may be:
name=val;node [name=val];edge [name=val];
set default graph, node, or edge attribute name to val. any subgraph, node, or edge appearing after this inherits the new default attributes. π«Ά
n0 [name0=val0,name1=val1,...];
creates node n0 (if it does not already exist) and sets its attributes according to the optional list.
n0 edgeop n1 edgeop ... edgeop nn [name0=val0,name1=val1,...];
creates edges between nodes n0, n1, ..., nn and sets their attributes according to the optional list. creates nodes as necessary. π
[subgraph name] { statement-list }
creates a subgraph. subgraphs may be used in place of n0, ..., nn in the above statements to create edges. [subgraph name] is optional; if missing, the subgraph is assigned an internal name.
comments may be /*C-like*/ or //C++-like. π
attribute names and values are ordinary (C-style) strings. the following sections describe attributes that control graph layout.
π GRAPH ATTRIBUTES π
size="x,y"β sets bounding box of drawing in inches.page="x,y"β sets the PostScript pagination unit.ratio=fβ sets the aspect ratio tof, which may be a floating point number, or one of the keywordsfill,compress, orauto.pagedir=[TBLR][TBLR]β sets the major and minor order of pagination.rotate=90β sets landscape mode. (orientation=landis backward compatible but obsolete.)center=nβ a non-zero value centers the drawing on the page.layers="id:id:id:id"β is a sequence of layer identifiers for overlay diagrams. the PostScript array variablelayercolorseqsets the assignment of colors to layers. the least index is1and each element must be a 3-element array to be interpreted as a color coordinate.color=colorvalueβ sets foreground color (bgcolorfor background).href="url"β the default url for image map files; in PostScript files, the base URL for all relative URLs, as recognized by Acrobat Distiller 3.0 and up.URL="url"β ("URL"is a synonym for"href".)stylesheet="file.css"β includes a reference to a stylesheet in-Tsvgand-Tsvgzoutputs. ignored by other formats.splinesβ if set totrue, edges are drawn as splines. if set topolyline, edges are drawn as polylines. if set toortho, edges are drawn as orthogonal polylines. in all of these cases, the nodes may not overlap. ifsplines=falseorsplines=line, edges are drawn as line segments. the default isfalse.
π NODE ATTRIBUTES π
height=dorwidth=dβ sets minimum height or width. addingfixedsize=trueforces these to be the actual size (text labels are ignored).shape=record polygon epsf builtin_polygonβbuiltin_polygonis one of:plaintext ellipse oval circle egg triangle box diamond trapezium parallelogram house hexagon octagon note tab box3d component. (polygons are defined or modified by the following node attributes:regular,peripheries,sides,orientation,distortionandskew.)epsfuses the node'sshapefileattribute as the path name of an external EPSF file to be automatically loaded for the node shape.label=textβ wheretextmay include escaped newlines\n,\l, or\rfor center, left, and right justified lines. the string'\N'value will be replaced by the node name. the string'\G'value will be replaced by the graph name. record labels may contain recursive box lists delimited by{ | }. port identifiers in labels are set off by angle brackets< >. in the graph file, use colon (such as,node0:port28).fontsize=nβ sets the label type size tonpoints.fontname=nameβ sets the label font family name.color=colorvalueβ sets the outline color, and the default fill color ifstyle=filledandfillcoloris not specified.fillcolor=colorvalueβ sets the fill color whenstyle=filled. if not specified, thefillcolorwhenstyle=filleddefaults to be the same as the outline color.fontcolor=colorvalueβ sets the label text color.
a colorvalue may be "h,s,v" (hue, saturation, brightness) floating point numbers between 0 and 1, or an X11 color name such as white black red green blue yellow magenta cyan or burlywood, or a "#rrggbb" (red, green, blue, 2 hex characters each) value. π¨
style=filled solid dashed dotted bold invisβ or any Postscript code.layer=idorid:idor"all"β sets the node's active layers. the empty string means no layers (invisible).
the following attributes apply only to polygon shape nodes:
regular=nβ ifnis non-zero then the polygon is made regular, i.e. symmetric about the x and y axis, otherwise the polygon takes on the aspect ratio of the label.builtin_polygonsthat are not already regular are made regular by this attribute.builtin_polygonsthat are already regular are not affected (i.e. they cannot be made asymmetric).peripheries=nβ sets the number of periphery lines drawn around the polygon. this value supersedes the number of periphery lines ofbuiltin_polygons.sides=nβ sets the number of sides to the polygon.n<3results in an ellipse. this attribute is ignored bybuiltin_polygons.orientation=fβ sets the orientation of the first apex of the polygon counterclockwise from the vertical, in degrees.fmay be a floating point number. the orientation of labels is not affected by this attribute. this attribute is added to the initial orientation ofbuiltin_polygons.distortion=fβ sets the amount of broadening of the top and narrowing of the bottom of the polygon (relative to its orientation). floating point values between-1and+1are suggested. this attribute is ignored bybuiltin_polygons.skew=fβ sets the amount of right-displacement of the top and left-displacement of the bottom of the polygon (relative to its orientation). floating point values between-1and+1are suggested. this attribute is ignored bybuiltin_polygons.href="url"β sets the url for the node in imagemap, PostScript and SVG files. the substrings'\N'and'\G'are substituted in the same manner as for the node label attribute. additionally the substring'\L'is substituted with the node label string.URL="url"β ("URL"is a synonym for"href".)target="target"β is a target string for client-side imagemaps and SVG, effective when nodes have a URL. the target string is used to determine which window of the browser is used for the URL. setting it to"_graphviz"will open a new window if it doesn't already exist, or reuse it if it does. if the target string is empty, the default, then no target attribute is included in the output. the substrings'\N'and'\G'are substituted in the same manner as for the node label attribute. additionally the substring'\L'is substituted with the node label string.tooltip="tooltip"β is a tooltip string for client-side imagemaps and SVG, effective when nodes have a URL. the tooltip string defaults to be the same as the label string, but this attribute permits nodes without labels to still have tooltips thus permitting denser graphs. the substrings'\N'and'\G'are substituted in the same manner as for the node label attribute. additionally the substring'\L'is substituted with the node label string.
label=textβ the whole vibe of your edge label. text can sneak in escaped newlines like\n,\l, or\rfor centered, left, or right justified lines respectively. If the substring\Tpops up in a label, it gets swapped for the tail_node name. If\Hshows up, it becomes the head_node name. If the substring\Evalue shows up, it gets replaced by:tail_node_name->head_node_name, or by:tail_node_name--head_node_namefor undirected graphs. And if\Gis in there, it becomes the graph name. β¨fontsize=nβ sets the label type size to n points.fontname=nameβ sets the label font family name.fontcolor=colorvalueβ sets the label text color. πstyle=solid dashed dotted bold invisβ pick your line aesthetic.color=colorvalueβ sets the line color for edges.color=colorvaluelistβ a:separated list of colorvalue makes parallel edges, one edge for each color. iconic honestly.dir=forward back both noneβ controls arrow direction.tailclip,headclip=falseβ disables endpoint shape clipping.href="url"β sets the url for the node in imagemap, PostScript and SVG files. The substrings\T,\H,\Eand\Gare substituted in the same manner as for the edge label attribute. Also, the substring\Lis substituted with the edge label string.URL="url"β (URLis a synonym forhref.)target="target"β a target string for clientβside imagemaps and SVG, effective when edges have a URL. If the target string is empty (which is the default), then no target attribute is included in the output. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.tooltip="tooltip"β a tooltip string for clientβside imagemaps, effective when edges have a URL. The tooltip string defaults to being the same as the edge label string. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.arrowhead,arrowtail=none, normal, inv, dot, odot, invdot, invodot, tee, empty, invempty, open, halfopen, diamond, odiamond, box, obox, crowβ the full menu of arrow shapes, no cap. πΉarrowsizeβ (norm_length=10,norm_width=5,inv_length=6,inv_width=7,dot_radius=2).headlabel,taillabel=stringβ for port labels.labelfontcolor,labelfontname,labelfontsizeβ for head and tail labels. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.headhref="url"β sets the url for the head port in imagemap, PostScript and SVG files. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.headURL="url"β (headURLis a synonym forheadhref.)headtarget="headtarget"β a target string for clientβside imagemaps and SVG, effective when edge heads have a URL. The headtarget string decides which window of the browser is used for the URL. If the headtarget string is empty (the default), then headtarget defaults to the same value astargetfor the edge. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.headtooltip="tooltip"β a tooltip string for clientβside imagemaps, effective when head ports have a URL. The tooltip string defaults to being the same as the headlabel string. The substrings\T,\H, and\Eare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.tailhref="url"β sets the url for the tail port in imagemap, PostScript and SVG files. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.tailURL="url"β (tailURLis a synonym fortailhref.)tailtarget="tailtarget"β a target string for clientβside imagemaps and SVG, effective when edge tails have a URL. The tailtarget string decides which window of the browser is used for the URL. If the tailtarget string is empty (the default), then tailtarget defaults to the same value astargetfor the edge. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.tailtooltip="tooltip"β a tooltip string for clientβside imagemaps, effective when tail ports have a URL. The tooltip string defaults to being the same as the taillabel string. The substrings\T,\H,\Eand\Gare substituted the same way as for the edge label attribute. Also,\Lis substituted with the edge label string.labeldistanceandport_label_distanceβ set distance; alsolabelangle(in degrees CCW).decorateβ draws a line from the edge to the label.samehead,sametailβ aim edges having the same value to the same port, using the average landing point.layer=idorid:idor"all"β sets the edge's active layers. The empty string means no layers (invisible). π»
πΈ (neatoβspecific attributes) πΈ
w=fβ sets the weight (spring constant) of an edge to the given floating point value. The default is1.0; greater values make the edge tend more toward its optimal length.len=fβ sets the optimal length of an edge. The default is1.0.
β¨ COMMAND LINE OPTIONS β¨
-Gβ sets a default graph attribute.-Nβ sets a default node attribute.-Eβ sets a default edge attribute. Example:-Gsize="7,8" -Nshape=box -Efontsize=8-lfileβ loads custom PostScript library files. Usually these define custom shapes or styles. If-lis given by itself, the standard library is omitted. π-Tlangβ sets the output language as described above.-Oβ automatically generate output filenames based on the input filename and the-Tformat.-ofileβ write output to file.-xβ reduce graph.-Lgβ don't use grid.-LOβ use old attractive force.-Lniβ set number of iterations to i.-LUiβ set unscaled factor to i.-LCvβ set overlap expansion factor to v.-LT[*]vβ set temperature (temperature factor) to v.-vβ (verbose) prints various information useful for debugging. bestie debugging era π₯-Vβ (version) prints version information and exits.-?β prints the usage and exits.
π EXAMPLES π
okay here's a whole little graph, slay:
digraph test123 {
pack=8
subgraph cluster0 {
packmode=array
x y x0 y0 x1
subgraph cluster1 {
m n
}
}
b [shape=box];
c [label="hello\nworld",color=blue,fontsize=24,
fontname="Palatino-Italic",fontcolor=red,style=filled];
a -> z
x -> z
a -> b -> c;
a -> {x y};
edge [style=dashed,color=red];
b -> x;
}
π AUTHORS π
Emden R. Gansner <erg@research.att.com> β the icon, the legend, periodt. π«Ά
π¦ SEE ALSO π¦
This man page contains only a small amount of the information related to the Graphviz layout programs. The most complete information can be found at https://www.graphviz.org/documentation/, especially in the onβline reference pages. Most of these documents are also available in the doc and doc/info subtrees in the source and binary distributions.
and that's a wrap, bestie π this is OSAGE(1), dated 27 May 2009 β yes she's an elder but she ATE and left no crumbs, go forth and graph responsibly πβ
π¦ where this page comes from
- alpine 3.22: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.23: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.24: graphviz-doc 12.2.1-r3 Β· EPL-1.0
- arch rolling: graphviz 16.1.0-2 Β· EPL
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- nixos 26.05: graphviz 12.2.1
- nixpkgs unstable: graphviz 15.1.1
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- ubuntu resolute: graphviz 14.1.2-1ubuntu1 Β· EPL-1.0
- ubuntu stonking: graphviz 14.1.2-1ubuntu2 Β· EPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms