From: Francois Fleuret Date: Fri, 24 Aug 2012 15:27:20 +0000 (+0200) Subject: Make all the nodes of identical size. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=24d311902f1367ea7de57ce8f737c12934234577;p=mtp.git Make all the nodes of identical size. --- diff --git a/mtp_graph.cc b/mtp_graph.cc index 4608b82..6867e09 100644 --- a/mtp_graph.cc +++ b/mtp_graph.cc @@ -147,22 +147,23 @@ void MTPGraph::print(ostream *os) { void MTPGraph::print_dot(ostream *os) { (*os) << "digraph {" << endl; - // (*os) << " node [shape=circle];" << endl; - (*os) << " edge [color=gray]" << endl; + (*os) << " node [shape=circle,width=0.7,fixedsize=true];" << endl; + (*os) << " edge [color=gray,arrowhead=open]" << endl; (*os) << " " << _source->id << " [peripheries=2];" << endl; (*os) << " " << _sink->id << " [peripheries=2];" << endl; + // (*os) << " " << _source->id << " [style=bold,color=red];" << endl; + // (*os) << " " << _sink->id << " [style=bold,color=green];" << endl; for(int k = 0; k < _nb_edges; k++) { Edge *e = _edges + k; // (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id - // << ";" - // << endl; + // << ";" + // << endl; + (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id + << " ["; if(e->occupied) { - (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id - << " [style=bold,color=black,label=\"" << e->length << "\"];" << endl; - } else { - (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id - << " [label=\"" << e->length << "\"];" << endl; + (*os) << "style=bold,color=black,"; } + (*os) << "label=\"" << e->length << "\"];" << endl; } (*os) << "}" << endl; }