COIN-OR::LEMON - Graph Library

Ticket #110: graph_to_eps_demo_fix_542dd614cbb4.patch

File graph_to_eps_demo_fix_542dd614cbb4.patch, 3.3 KB (added by Peter Kovacs, 11 years ago)
  • demo/graph_to_eps_demo.cc

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1216021278 -7200
    # Node ID 542dd614cbb44625e960654db6c57dc429a43116
    # Parent  81cfc04531e8fcf0a6e72f22ff2871fcb827c416
    Small fixes in graph_to_eps_demo.cc
    
    diff -r 81cfc04531e8 -r 542dd614cbb4 demo/graph_to_eps_demo.cc
    a b  
    2020/// \file
    2121/// \brief Demo of the graph drawing function \ref graphToEps()
    2222///
    23 /// This demo program shows examples how to  use the function \ref
    24 /// graphToEps(). It takes no input but simply creates  six
     23/// This demo program shows examples how to use the function \ref
     24/// graphToEps(). It takes no input but simply creates seven
    2525/// <tt>.eps</tt> files demonstrating the capability of \ref
    2626/// graphToEps(), and showing how to draw directed graphs,
    2727/// how to handle parallel egdes, how to change the properties (like
     
    8181
    8282  IdMap<ListDigraph,Node> id(g);
    8383
    84   // Create five .eps files showing the digraph with different options
     84  // Create .eps files showing the digraph with different options
    8585  cout << "Create 'graph_to_eps_demo_out_1_pure.eps'" << endl;
    8686  graphToEps(g,"graph_to_eps_demo_out_1_pure.eps").
    8787    coords(coords).
     
    118118    drawArrows().arrowWidth(2).arrowLength(2).
    119119    run();
    120120
     121  // Add more arcs to the digraph
    121122  a=g.addArc(n1,n4); acolors[a]=2; widths[a]=1;
    122123  a=g.addArc(n4,n1); acolors[a]=1; widths[a]=2;
    123124
     
    129130  a=g.addArc(n1,n2); acolors[a]=6; widths[a]=1;
    130131  a=g.addArc(n1,n2); acolors[a]=7; widths[a]=1;
    131132
    132   cout << "Create 'graph_to_eps_demo_out_par.eps'" << endl;
    133   graphToEps(g,"graph_to_eps_demo_out_par.eps").
    134     //scale(10).
     133  cout << "Create 'graph_to_eps_demo_out_4_par.eps'" << endl;
     134  graphToEps(g,"graph_to_eps_demo_out_4_par.eps").
    135135    title("Sample .eps figure (parallel arcs)").
    136136    copyright("(C) 2003-2008 LEMON Project").
    137137    absoluteNodeSizes().absoluteArcWidths().
     
    145145    enableParallel().parArcDist(1.5).
    146146    run();
    147147
    148   cout << "Create 'graph_to_eps_demo_out_4_par_arr.eps'" << endl;
    149   graphToEps(g,"graph_to_eps_demo_out_4_par_arr.eps").
     148  cout << "Create 'graph_to_eps_demo_out_5_par_arr.eps'" << endl;
     149  graphToEps(g,"graph_to_eps_demo_out_5_par_arr.eps").
    150150    title("Sample .eps figure (parallel arcs and arrowheads)").
    151151    copyright("(C) 2003-2008 LEMON Project").
    152152    absoluteNodeSizes().absoluteArcWidths().
     
    161161    drawArrows().arrowWidth(1).arrowLength(1).
    162162    run();
    163163
    164   cout << "Create 'graph_to_eps_demo_out_5_par_arr_a4.eps'" << endl;
    165   graphToEps(g,"graph_to_eps_demo_out_5_par_arr_a4.eps").
     164  cout << "Create 'graph_to_eps_demo_out_6_par_arr_a4.eps'" << endl;
     165  graphToEps(g,"graph_to_eps_demo_out_6_par_arr_a4.eps").
    166166    title("Sample .eps figure (fits to A4)").
    167167    copyright("(C) 2003-2008 LEMON Project").
    168168    scaleToA4().
     
    190190    hcolors[n]=i;
    191191  }
    192192
    193   cout << "Create 'graph_to_eps_demo_out_6_colors.eps'" << endl;
    194   graphToEps(h,"graph_to_eps_demo_out_6_colors.eps").
     193  cout << "Create 'graph_to_eps_demo_out_7_colors.eps'" << endl;
     194  graphToEps(h,"graph_to_eps_demo_out_7_colors.eps").
    195195    scale(60).
    196196    title("Sample .eps figure (Palette demo)").
    197197    copyright("(C) 2003-2008 LEMON Project").