From 24d311902f1367ea7de57ce8f737c12934234577 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 24 Aug 2012 17:27:20 +0200 Subject: [PATCH] Make all the nodes of identical size. --- mtp_graph.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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; } -- 2.39.5