COIN-OR::LEMON - Graph Library

Changeset 2178:0d7c0f96a5ee in lemon-0.x for demo/graph_to_eps_demo.cc


Ignore:
Timestamp:
08/14/06 17:15:57 (18 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2894
Message:
  • bezier.h went to lemon/bits/
  • new graphToEps() option: absolute/relative node size/link width scaling.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • demo/graph_to_eps_demo.cc

    r2172 r2178  
    4343{
    4444  Palette palette;
     45  Palette paletteW(true);
    4546
    4647  ListGraph g;
     
    8182  IdMap<ListGraph,Node> id(g);
    8283
     84  cout << "Create 'graph_to_eps_demo_out_pure.eps'" << endl;
     85  graphToEps(g,"graph_to_eps_demo_out_pure.eps").
     86    //scale(10).
     87    coords(coords).
     88    title("Sample .eps figure").
     89    copyright("(C) 2006 LEMON Project").
     90    run();
     91
    8392  cout << "Create 'graph_to_eps_demo_out.eps'" << endl;
    8493  graphToEps(g,"graph_to_eps_demo_out.eps").
     
    8796    title("Sample .eps figure").
    8897    copyright("(C) 2006 LEMON Project").
     98    absoluteNodeSizes().absoluteEdgeWidths().
    8999    nodeScale(2).nodeSizes(sizes).
    90100    nodeShapes(shapes).
     
    101111    title("Sample .eps figure (with arrowheads)").
    102112    copyright("(C) 2006 LEMON Project").
     113    absoluteNodeSizes().absoluteEdgeWidths().
    103114    nodeColors(composeMap(palette,colors)).
    104115    coords(coords).
     
    127138    title("Sample .eps figure (parallel edges)").
    128139    copyright("(C) 2006 LEMON Project").
     140    absoluteNodeSizes().absoluteEdgeWidths().
    129141    nodeShapes(shapes).
    130142    coords(coords).
     
    142154    title("Sample .eps figure (parallel edges and arrowheads)").
    143155    copyright("(C) 2006 LEMON Project").
     156    absoluteNodeSizes().absoluteEdgeWidths().
    144157    nodeScale(2).nodeSizes(sizes).
    145158    coords(coords).
     
    157170    title("Sample .eps figure (fits to A4)").
    158171    copyright("(C) 2006 LEMON Project").
     172    absoluteNodeSizes().absoluteEdgeWidths().
    159173    nodeScale(2).nodeSizes(sizes).
    160174    coords(coords).
     
    173187 
    174188  int cols=int(sqrt(double(palette.size())));
    175   for(int i=0;i<int(palette.size());i++) {
     189  for(int i=0;i<int(paletteW.size());i++) {
    176190    Node n=h.addNode();
    177191    hcoords[n]=Xy(i%cols,i/cols);
     
    185199    copyright("(C) 2006 LEMON Project").
    186200    coords(hcoords).
    187     nodeScale(.45).
     201    absoluteNodeSizes().absoluteEdgeWidths().
     202    nodeScale(45).
    188203    distantColorNodeTexts().
    189204    //    distantBWNodeTexts().
    190205    nodeTexts(hcolors).nodeTextSize(.6).
    191     nodeColors(composeMap(palette,hcolors)).
    192     run();
    193 
    194 
     206    nodeColors(composeMap(paletteW,hcolors)).
     207    run();
    195208}
Note: See TracChangeset for help on using the changeset viewer.