src/demo/graph_to_eps_demo.cc
changeset 1122 3ce7fc516cca
parent 1103 f196dc4f1b31
child 1164 80bb73097736
equal deleted inserted replaced
4:21156aa4105a 5:af46d9268da4
    88   e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1;
    88   e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1;
    89   
    89   
    90   IdMap id(g);
    90   IdMap id(g);
    91 
    91 
    92   graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
    92   graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
       
    93     title("Sample .eps figure").
       
    94     copyright("(C) 2004 LEMON Project").
    93     nodeScale(2).nodeSizes(sizes).
    95     nodeScale(2).nodeSizes(sizes).
    94     nodeShapes(shapes).
    96     nodeShapes(shapes).
    95     nodeColors(composeMap(colorSet,colors)).
    97     nodeColors(composeMap(colorSet,colors)).
    96     edgeColors(composeMap(colorSet,ecolors)).
    98     edgeColors(composeMap(colorSet,ecolors)).
    97     edgeWidthScale(.4).edgeWidths(widths).
    99     edgeWidthScale(.4).edgeWidths(widths).
    98     nodeTexts(id).nodeTextSize(3).
   100     nodeTexts(id).nodeTextSize(3).
    99     run();
   101     run();
   100 
   102 
   101   graphToEps(g,"graph_to_eps_demo_out_arr.eps").scale(10).
   103   graphToEps(g,"graph_to_eps_demo_out_arr.eps").scale(10).
       
   104     title("Sample .eps figure (with arrowheads)").
       
   105     copyright("(C) 2004 LEMON Project").
   102     nodeColors(composeMap(colorSet,colors)).
   106     nodeColors(composeMap(colorSet,colors)).
   103     coords(coords).
   107     coords(coords).
   104     nodeScale(2).nodeSizes(sizes).
   108     nodeScale(2).nodeSizes(sizes).
   105     nodeShapes(shapes).
   109     nodeShapes(shapes).
   106     edgeColors(composeMap(colorSet,ecolors)).
   110     edgeColors(composeMap(colorSet,ecolors)).
   119   e=g.addEdge(n1,n2); ecolors[e]=5; widths[e]=1;
   123   e=g.addEdge(n1,n2); ecolors[e]=5; widths[e]=1;
   120   e=g.addEdge(n1,n2); ecolors[e]=6; widths[e]=1;
   124   e=g.addEdge(n1,n2); ecolors[e]=6; widths[e]=1;
   121   e=g.addEdge(n1,n2); ecolors[e]=7; widths[e]=1;
   125   e=g.addEdge(n1,n2); ecolors[e]=7; widths[e]=1;
   122 
   126 
   123   graphToEps(g,"graph_to_eps_demo_out_par.eps").scale(10).
   127   graphToEps(g,"graph_to_eps_demo_out_par.eps").scale(10).
       
   128     title("Sample .eps figure (parallel edges)").
       
   129     copyright("(C) 2004 LEMON Project").
   124     nodeShapes(shapes).
   130     nodeShapes(shapes).
   125     coords(coords).
   131     coords(coords).
   126     nodeScale(2).nodeSizes(sizes).
   132     nodeScale(2).nodeSizes(sizes).
   127     nodeColors(composeMap(colorSet,colors)).
   133     nodeColors(composeMap(colorSet,colors)).
   128     edgeColors(composeMap(colorSet,ecolors)).
   134     edgeColors(composeMap(colorSet,ecolors)).
   130     nodeTexts(id).nodeTextSize(3).
   136     nodeTexts(id).nodeTextSize(3).
   131     enableParallel().parEdgeDist(1.5).
   137     enableParallel().parEdgeDist(1.5).
   132     run();
   138     run();
   133   
   139   
   134   graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").scale(10).
   140   graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").scale(10).
       
   141     title("Sample .eps figure (parallel edges and arrowheads)").
       
   142     copyright("(C) 2004 LEMON Project").
   135     nodeScale(2).nodeSizes(sizes).
   143     nodeScale(2).nodeSizes(sizes).
   136     coords(coords).
   144     coords(coords).
   137     nodeShapes(shapes).
   145     nodeShapes(shapes).
   138     nodeColors(composeMap(colorSet,colors)).
   146     nodeColors(composeMap(colorSet,colors)).
   139     edgeColors(composeMap(colorSet,ecolors)).
   147     edgeColors(composeMap(colorSet,ecolors)).
   142     enableParallel().parEdgeDist(1).
   150     enableParallel().parEdgeDist(1).
   143     drawArrows().arrowWidth(1).arrowLength(1).
   151     drawArrows().arrowWidth(1).arrowLength(1).
   144     run();
   152     run();
   145 
   153 
   146   graphToEps(g,"graph_to_eps_demo_out_a4.eps").scaleToA4().
   154   graphToEps(g,"graph_to_eps_demo_out_a4.eps").scaleToA4().
       
   155     title("Sample .eps figure (fits to A4)").
       
   156     copyright("(C) 2004 LEMON Project").
   147     nodeScale(2).nodeSizes(sizes).
   157     nodeScale(2).nodeSizes(sizes).
   148     coords(coords).
   158     coords(coords).
   149     nodeShapes(shapes).
   159     nodeShapes(shapes).
   150     nodeColors(composeMap(colorSet,colors)).
   160     nodeColors(composeMap(colorSet,colors)).
   151     edgeColors(composeMap(colorSet,ecolors)).
   161     edgeColors(composeMap(colorSet,ecolors)).