form of the output, e.g. in JPEG or GIF format, to attach links
to nodes and edges. For example, given the dot file
- /* x.dot */
+ /* x.gv */
digraph G {
URL="http://www.research.att.com/";
command [URL="command.html"];
>> context: >>> <<< digraph G {
>> dotty.lefty: giving up on dot
>> dotty.lefty: graph that causes dot
->> dotty.lefty: to fail has been saved in file dottybug.dot
+>> dotty.lefty: to fail has been saved in file dottybug.gv
</pre>
Probably there is a command in your shell environment (such as
.alias or .profile) that does output even for non-interactive shells.
Then run <tt>neato -s -n2</tt>. For example:
<pre>
-neato -s -n2 -Tgif file.dot -o file.gif
+neato -s -n2 -Tgif file.gv -o file.gif
</pre>
Note that if an edge does not have a <TT>pos</TT> attribute
defined, neato will perform whatever edge routing it would
It is possible to use neato for this,
running neato -s -n For example:
<pre>
-neato -s -n -Tgif file.dot -o file.gif
+neato -s -n -Tgif file.gv -o file.gif
</pre>
neato will use the node positions, but use its technique
for routing the edges. There are several things to note. First,
but when I execute a Perl/CGI script through Apache, no output is generated.</A>
For example, the code
<tt>
-system("/usr/local/bin/dot -Tpng /tmp/tree.dot -o /tmp/tree.png");
+system("/usr/local/bin/dot -Tpng /tmp/tree.gv -o /tmp/tree.png");
</tt>
produces no file <tt>/tmp/tree.png</tt>.</B>
<P>
but with a different random seed value,
or more iterations, you'll get a better layout. For example:
<pre>
-neato -Gstart=5 file.dot -Tps -o file.ps
-neato -Gepsilon=.0000001 file.dot -Tps -o file.ps
+neato -Gstart=5 file.gv -Tps -o file.ps
+neato -Gepsilon=.0000001 file.gv -Tps -o file.ps
</pre>
<P>
In particular, note that there are no guarantees that neato will produce
<p>
which deletes the Launch Services database and rebuilds it from existing apps. You may need to sudo to do this.
<p>
-3. Verify that the Graphviz.app can now open .dot files and Microsoft Word can still open its own .dot files.
+3. Verify that the Graphviz.app can now open .gv files and Microsoft Word can still open its own .gv files.
<p>
-One artifact of this will be that Microsoft .dot files may appear with the Graphviz document icon. Unfortunately there doesn't seem any a priori way of getting the system to determine whether an arbitrary .dot file belongs to Word or Graphviz -- you can choose which application to open with by right-clicking or control-clicking on the document icon and choosing the app.
+One artifact of this will be that Microsoft .gv files may appear with the Graphviz document icon. Unfortunately there doesn't seem any a priori way of getting the system to determine whether an arbitrary .gv file belongs to Word or Graphviz -- you can choose which application to open with by right-clicking or control-clicking on the document icon and choosing the app.
<p>
As for why the Launch Services database doesn't automatically register Graphviz,
we're not entirely sure but suspect this only happens if both conditions
\def\dag{{\it dag}}
\def\DOT{{\it DOT}}
\def\graphviz{{\it Graphviz}}
-\newcommand{\lastedited}{December 22, 2009}
+\newcommand{\lastedited}{November 2, 2010}
\date{\lastedited}
\newcommand{\mymark}{{\it dot} User's Manual, \lastedited \hfil }
\markboth{\mymark}{\mymark}
An edge is created when nodes are joined by the edge operator \verb"->".
In the example, line 2 makes edges from {\it main} to {\it parse},
and from {\it parse} to {\it execute}.
-Running \dot\ on this file (call it \verb"graph1.dot")
+Running \dot\ on this file (call it \verb"graph1.gv")
\begin{verbatim}
- $ dot -Tps graph1.dot -o graph1.ps
+ $ dot -Tps graph1.gv -o graph1.ps
\end{verbatim}
yields the drawing of Figure~\ref{fig:drawing1}.
The command line option \verb"-Tps" selects PostScript (EPSF) output.
\end{verbatim}
Use the \verb"-l" command line option to load this file.
\begin{verbatim}
- dot -Tps -l lib.ps file.dot -o file.ps
+ dot -Tps -l lib.ps file.gv -o file.ps
\end{verbatim}
The {\tt style} attribute controls miscellaneous graphics features of
An edge is created when nodes are joined by the edge operator \verb"->".
In the example, line 2 makes edges from {\it main} to {\it parse},
and from {\it parse} to {\it execute}.
-Running \dot\ on this file (call it \verb"graph1.dot")
+Running \dot\ on this file (call it \verb"graph1.gv")
\begin{verbatim}
- $ dot -Tps graph1.dot -o graph1.ps
+ $ dot -Tps graph1.gv -o graph1.ps
\end{verbatim}
yields the drawing of Figure~\ref{fig:drawing1}.
The command line option \verb"-Tps" selects PostScript (EPSF) output.
\end{verbatim}
Use the \verb"-l" command line option to load this file.
\begin{verbatim}
- dot -Tps -l lib.ps file.dot -o file.ps
+ dot -Tps -l lib.ps file.gv -o file.ps
\end{verbatim}
The {\tt style} attribute controls miscellaneous graphics features of
gnvt = dotty.createviewandgraph (null, 'file', fa.protogt, fa.protovt);
gt = gnvt.gt;
- gt.loadgraph (gt, 'fa.dot', 'file', fa.protogt.graph, 1);
+ gt.loadgraph (gt, 'fa.gv', 'file', fa.protogt.graph, 1);
fa.currstate = gt.graph.nodes[gt.graph.nodedict['start']];
fa.loadtrans ('fa.trans');
fa.setcurrcolor (gt, fa.currstate);
As an example, the user can start up {\DOTTY} and select \verb+load graph+ from
the menu. Figure~\ref{figdotty1}a shows the \verb+DOTTY+ window and the dialog
window that asks for the graph file name. In this example, the user asks for
-file \verb+d.dot+. Figure~\ref{figdotty1}b shows the result of the \verb+load
+file \verb+d.gv+. Figure~\ref{figdotty1}b shows the result of the \verb+load
graph+ action.
\begin{figure}[htb]
Font selection. ===============
-The fontname attribute in .dot graphs is a fontconfig style specification.
+The fontname attribute in .gv graphs is a fontconfig style specification.
From: http://www.fontconfig.org/fontconfig-user.html
Fontconfig provides a textual representation for patterns that
$ fc-list
How can I tell what fonts dot is using;
- $ dot foo.dot -Tpng -o foo.png -v 2>&1 | grep font
+ $ dot foo.gv -Tpng -o foo.png -v 2>&1 | grep font
How can I add a custom font?
In the current version of Graphviz with fontconfig, Cairo and
script, it is not enough to use an export command but rather the
variables should be set when the command is run, for example,<BR>
<CODE>
-SERVER_NAME=xxx GV_FILE_PATH="images:etc/images:/usr/share/images" dot -Tpng -o x.png x.dot
+SERVER_NAME=xxx GV_FILE_PATH="images:etc/images:/usr/share/images" dot -Tpng -o x.png x.gv
</CODE>
<P>
Note that the image files must really reside in one of the specified directories. If the
links to nodes and edges. For example, to create a server-side map
given the dot file
<PRE>
-/* x.dot */
+/* x.gv */
digraph mainmap {
URL="http://www.research.att.com/base.html";
command [URL="http://www.research.att.com/command.html"];
</PRE>
one would process the graph and generate two output files:
<PRE>
-dot -Timap -ox.map -Tgif -ox.gif x.dot
+dot -Timap -ox.map -Tgif -ox.gif x.gv
</PRE>
and then refer to it in a web page:
<XMP>
</XMP>
For client-side maps, one again generates two output files:
<PRE>
-dot -Tcmapx -ox.map -Tgif -ox.gif x.dot
+dot -Tcmapx -ox.map -Tgif -ox.gif x.gv
</PRE>
and uses the HTML
<XMP>
\begin{figure}[h]
\begin{minipage}[b]{2in}
\begin{verbatim}
-$ cat example.dot
+$ cat example.gv
graph G {
n0 -- n1 -- n2 -- n3 -- n0;
}
-$ neato -Tps example.dot -o example.ps
+$ neato -Tps example.gv -o example.ps
\end{verbatim}
If the value is not a number, the process ID or current time is used.
Each run potentially yields a different drawing. For example:
\begin{verbatim}
-$ neato -Tps -Gstart=rand file.dot > file.ps
+$ neato -Tps -Gstart=rand file.gv > file.ps
\end{verbatim}
\subsection{Termination Threshold}
You can also directly limit the number of iterations.
It is convenient to do this on the command line:
\begin{verbatim}
-$ neato -Tps -Gepsilon=.001 small.dot -o small.ps
-$ neato -Tps -Gepsilon=1.5 big.dot -o big.ps
-$ neato -Tps -Gmaxiter=1000 big.dot -o big.ps
+$ neato -Tps -Gepsilon=.001 small.gv -o small.ps
+$ neato -Tps -Gepsilon=1.5 big.gv -o big.ps
+$ neato -Tps -Gmaxiter=1000 big.gv -o big.ps
\end{verbatim}
\subsection{Edge Lengths and Weights}