Changeset 2172:4b25e7003868 in lemon-0.x for demo/graph_to_eps_demo.cc
- Timestamp:
- 08/10/06 12:18:04 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2887
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/graph_to_eps_demo.cc
r1956 r2172 42 42 int main() 43 43 { 44 ColorSet colorSet;44 Palette palette; 45 45 46 46 ListGraph g; … … 89 89 nodeScale(2).nodeSizes(sizes). 90 90 nodeShapes(shapes). 91 nodeColors(composeMap( colorSet,colors)).92 edgeColors(composeMap( colorSet,ecolors)).91 nodeColors(composeMap(palette,colors)). 92 edgeColors(composeMap(palette,ecolors)). 93 93 edgeWidthScale(.4).edgeWidths(widths). 94 94 nodeTexts(id).nodeTextSize(3). … … 101 101 title("Sample .eps figure (with arrowheads)"). 102 102 copyright("(C) 2006 LEMON Project"). 103 nodeColors(composeMap( colorSet,colors)).103 nodeColors(composeMap(palette,colors)). 104 104 coords(coords). 105 105 nodeScale(2).nodeSizes(sizes). 106 106 nodeShapes(shapes). 107 edgeColors(composeMap( colorSet,ecolors)).107 edgeColors(composeMap(palette,ecolors)). 108 108 edgeWidthScale(.4).edgeWidths(widths). 109 109 nodeTexts(id).nodeTextSize(3). … … 130 130 coords(coords). 131 131 nodeScale(2).nodeSizes(sizes). 132 nodeColors(composeMap( colorSet,colors)).133 edgeColors(composeMap( colorSet,ecolors)).132 nodeColors(composeMap(palette,colors)). 133 edgeColors(composeMap(palette,ecolors)). 134 134 edgeWidthScale(.4).edgeWidths(widths). 135 135 nodeTexts(id).nodeTextSize(3). … … 145 145 coords(coords). 146 146 nodeShapes(shapes). 147 nodeColors(composeMap( colorSet,colors)).148 edgeColors(composeMap( colorSet,ecolors)).147 nodeColors(composeMap(palette,colors)). 148 edgeColors(composeMap(palette,ecolors)). 149 149 edgeWidthScale(.3).edgeWidths(widths). 150 150 nodeTexts(id).nodeTextSize(3). … … 160 160 coords(coords). 161 161 nodeShapes(shapes). 162 nodeColors(composeMap( colorSet,colors)).163 edgeColors(composeMap( colorSet,ecolors)).162 nodeColors(composeMap(palette,colors)). 163 edgeColors(composeMap(palette,ecolors)). 164 164 edgeWidthScale(.3).edgeWidths(widths). 165 165 nodeTexts(id).nodeTextSize(3). … … 172 172 ListGraph::NodeMap<Xy> hcoords(h); 173 173 174 int cols=int(sqrt(double( colorSet.size())));175 for(int i=0;i<int( colorSet.size());i++) {174 int cols=int(sqrt(double(palette.size()))); 175 for(int i=0;i<int(palette.size());i++) { 176 176 Node n=h.addNode(); 177 177 hcoords[n]=Xy(i%cols,i/cols); … … 182 182 graphToEps(h,"graph_to_eps_demo_out_colors.eps"). 183 183 //scale(60). 184 title("Sample .eps figure ( ColorSetdemo)").184 title("Sample .eps figure (Palette demo)"). 185 185 copyright("(C) 2006 LEMON Project"). 186 186 coords(hcoords). … … 189 189 // distantBWNodeTexts(). 190 190 nodeTexts(hcolors).nodeTextSize(.6). 191 nodeColors(composeMap( colorSet,hcolors)).191 nodeColors(composeMap(palette,hcolors)). 192 192 run(); 193 193
Note: See TracChangeset
for help on using the changeset viewer.