demo/coloring.cc
changeset 2205 c20b0eb92a33
parent 2116 b6a68c15a6a3
child 2207 75a29ac69c19
equal deleted inserted replaced
12:a0af595aa643 13:01bd5ef2bad5
    95     int current = 0;
    95     int current = 0;
    96     while (forbidden.find(current) != forbidden.end()) ++current;
    96     while (forbidden.find(current) != forbidden.end()) ++current;
    97     color[order[i]] = current;
    97     color[order[i]] = current;
    98   }
    98   }
    99 
    99 
   100   ColorSet colorSet;
   100   Palette palette;
   101 
   101 
   102   graphToEps(graph, "coloring.eps").
   102   graphToEps(graph, "coloring.eps").
   103     title("Six Colored Plan Graph").copyright("(C) 2006 LEMON Project").
   103     title("Six Colored Plan Graph").copyright("(C) 2006 LEMON Project").
   104     coords(coords).nodeColors(composeMap(colorSet, color)).
   104     coords(coords).nodeColors(composeMap(palette, color)).
   105     nodeScale(5.0).scaleToA4().run();
   105     nodeScale(5.0).scaleToA4().run();
   106 
   106 
   107   return 0;
   107   return 0;
   108 }
   108 }