COIN-OR::LEMON - Graph Library

Changeset 2172:4b25e7003868 in lemon-0.x for demo/graph_to_eps_demo.cc


Ignore:
Timestamp:
08/10/06 12:18:04 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2887
Message:
  • Change ColorSet? to Palette
  • Minor change in graph_orientation demo.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/graph_to_eps_demo.cc

    r1956 r2172  
    4242int main()
    4343{
    44   ColorSet colorSet;
     44  Palette palette;
    4545
    4646  ListGraph g;
     
    8989    nodeScale(2).nodeSizes(sizes).
    9090    nodeShapes(shapes).
    91     nodeColors(composeMap(colorSet,colors)).
    92     edgeColors(composeMap(colorSet,ecolors)).
     91    nodeColors(composeMap(palette,colors)).
     92    edgeColors(composeMap(palette,ecolors)).
    9393    edgeWidthScale(.4).edgeWidths(widths).
    9494    nodeTexts(id).nodeTextSize(3).
     
    101101    title("Sample .eps figure (with arrowheads)").
    102102    copyright("(C) 2006 LEMON Project").
    103     nodeColors(composeMap(colorSet,colors)).
     103    nodeColors(composeMap(palette,colors)).
    104104    coords(coords).
    105105    nodeScale(2).nodeSizes(sizes).
    106106    nodeShapes(shapes).
    107     edgeColors(composeMap(colorSet,ecolors)).
     107    edgeColors(composeMap(palette,ecolors)).
    108108    edgeWidthScale(.4).edgeWidths(widths).
    109109    nodeTexts(id).nodeTextSize(3).
     
    130130    coords(coords).
    131131    nodeScale(2).nodeSizes(sizes).
    132     nodeColors(composeMap(colorSet,colors)).
    133     edgeColors(composeMap(colorSet,ecolors)).
     132    nodeColors(composeMap(palette,colors)).
     133    edgeColors(composeMap(palette,ecolors)).
    134134    edgeWidthScale(.4).edgeWidths(widths).
    135135    nodeTexts(id).nodeTextSize(3).
     
    145145    coords(coords).
    146146    nodeShapes(shapes).
    147     nodeColors(composeMap(colorSet,colors)).
    148     edgeColors(composeMap(colorSet,ecolors)).
     147    nodeColors(composeMap(palette,colors)).
     148    edgeColors(composeMap(palette,ecolors)).
    149149    edgeWidthScale(.3).edgeWidths(widths).
    150150    nodeTexts(id).nodeTextSize(3).
     
    160160    coords(coords).
    161161    nodeShapes(shapes).
    162     nodeColors(composeMap(colorSet,colors)).
    163     edgeColors(composeMap(colorSet,ecolors)).
     162    nodeColors(composeMap(palette,colors)).
     163    edgeColors(composeMap(palette,ecolors)).
    164164    edgeWidthScale(.3).edgeWidths(widths).
    165165    nodeTexts(id).nodeTextSize(3).
     
    172172  ListGraph::NodeMap<Xy> hcoords(h);
    173173 
    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++) {
    176176    Node n=h.addNode();
    177177    hcoords[n]=Xy(i%cols,i/cols);
     
    182182  graphToEps(h,"graph_to_eps_demo_out_colors.eps").
    183183    //scale(60).
    184     title("Sample .eps figure (ColorSet demo)").
     184    title("Sample .eps figure (Palette demo)").
    185185    copyright("(C) 2006 LEMON Project").
    186186    coords(hcoords).
     
    189189    //    distantBWNodeTexts().
    190190    nodeTexts(hcolors).nodeTextSize(.6).
    191     nodeColors(composeMap(colorSet,hcolors)).
     191    nodeColors(composeMap(palette,hcolors)).
    192192    run();
    193193
Note: See TracChangeset for help on using the changeset viewer.