Changeset 1573:b76a0af36f44 in lemon-0.x for demo/graph_to_eps_demo.cc
- Timestamp:
- 07/20/05 10:06:32 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2072
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_to_eps_demo.cc
r1435 r1573 15 15 */ 16 16 17 #include<lemon/graph_to_eps.h> 18 #include<lemon/maps.h> 19 #include<lemon/list_graph.h> 20 #include<lemon/graph_utils.h> 17 /// \ingroup demos 18 /// \file 19 /// \brief Demo of the graph grawing function \ref graphToEps() 20 /// 21 /// This demo program shows examples how to use the function \ref 22 /// graphToEps(). It takes no input but simply creates six 23 /// <tt>.eps</tt> files demonstrating how to draw directed/undirected 24 /// graphs, how to handle parallel egdes, how to change the properties 25 /// (like color, shape, size, title etc.) of nodes and edges 26 /// individually using appropriate \ref maps-page "graphmaps". 21 27 22 28 #include <cmath> 23 29 30 #include<lemon/graph_to_eps.h> 31 #include<lemon/list_graph.h> 24 32 25 33 using namespace std; … … 67 75 IdMap<ListGraph,Node> id(g); 68 76 77 cout << "Create 'graph_to_eps_demo_out.eps'" << endl; 69 78 graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords). 70 79 title("Sample .eps figure"). … … 78 87 run(); 79 88 89 90 cout << "Create 'graph_to_eps_demo_out_arr.eps'" << endl; 80 91 graphToEps(g,"graph_to_eps_demo_out_arr.eps").scale(10). 81 92 title("Sample .eps figure (with arrowheads)"). … … 102 113 e=g.addEdge(n1,n2); ecolors[e]=7; widths[e]=1; 103 114 115 cout << "Create 'graph_to_eps_demo_out_par.eps'" << endl; 104 116 graphToEps(g,"graph_to_eps_demo_out_par.eps").scale(10). 105 117 title("Sample .eps figure (parallel edges)"). … … 115 127 run(); 116 128 129 cout << "Create 'graph_to_eps_demo_out_par_arr.eps'" << endl; 117 130 graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").scale(10). 118 131 title("Sample .eps figure (parallel edges and arrowheads)"). … … 129 142 run(); 130 143 144 cout << "Create 'graph_to_eps_demo_out_a4.eps'" << endl; 131 145 graphToEps(g,"graph_to_eps_demo_out_a4.eps").scaleToA4(). 132 146 title("Sample .eps figure (fits to A4)"). … … 154 168 } 155 169 170 cout << "Create 'graph_to_eps_demo_out_colors.eps'" << endl; 156 171 graphToEps(h,"graph_to_eps_demo_out_colors.eps").scale(60). 157 title("Sample .eps figure ( parallel edges and arrowheads)").172 title("Sample .eps figure (ColorSet demo)"). 158 173 copyright("(C) 2005 LEMON Project"). 159 174 coords(hcoords).
Note: See TracChangeset
for help on using the changeset viewer.