src/demo/graph_to_eps_demo.cc
changeset 1086 caa13d291528
parent 1073 bedab8bd915f
child 1088 358526a620f8
     1.1 --- a/src/demo/graph_to_eps_demo.cc	Sun Jan 16 22:34:51 2005 +0000
     1.2 +++ b/src/demo/graph_to_eps_demo.cc	Tue Jan 18 12:02:27 2005 +0000
     1.3 @@ -67,14 +67,15 @@
     1.4    ListGraph::NodeMap<Xy> coords(g);
     1.5    ListGraph::NodeMap<double> sizes(g);
     1.6    ListGraph::NodeMap<int> colors(g);
     1.7 +  ListGraph::NodeMap<int> shapes(g);
     1.8    ListGraph::EdgeMap<int> ecolors(g);
     1.9    ListGraph::EdgeMap<int> widths(g);
    1.10    
    1.11 -  coords[n1]=Xy(50,50);  sizes[n1]=1; colors[n1]=1;
    1.12 -  coords[n2]=Xy(50,70);  sizes[n2]=2; colors[n2]=2;
    1.13 -  coords[n3]=Xy(70,70);  sizes[n3]=1; colors[n3]=3;
    1.14 -  coords[n4]=Xy(70,50);  sizes[n4]=2; colors[n4]=4;
    1.15 -  coords[n5]=Xy(85,60);  sizes[n5]=3; colors[n5]=5;
    1.16 +  coords[n1]=Xy(50,50);  sizes[n1]=1; colors[n1]=1; shapes[n1]=0;
    1.17 +  coords[n2]=Xy(50,70);  sizes[n2]=2; colors[n2]=2; shapes[n2]=0;
    1.18 +  coords[n3]=Xy(70,70);  sizes[n3]=1; colors[n3]=3; shapes[n3]=0;
    1.19 +  coords[n4]=Xy(70,50);  sizes[n4]=2; colors[n4]=4; shapes[n4]=1;
    1.20 +  coords[n5]=Xy(85,60);  sizes[n5]=3; colors[n5]=5; shapes[n5]=0;
    1.21    
    1.22    Edge e;
    1.23  
    1.24 @@ -90,6 +91,7 @@
    1.25  
    1.26    graphToEps(g,"graph_to_eps_demo_out.eps").scale(10).coords(coords).
    1.27      nodeScale(2).nodeSizes(sizes).
    1.28 +    nodeShapes(shapes).
    1.29      nodeColors(composeMap(colorSet,colors)).
    1.30      edgeColors(composeMap(colorSet,ecolors)).
    1.31      edgeWidthScale(.4).edgeWidths(widths).
    1.32 @@ -97,6 +99,7 @@
    1.33  
    1.34    graphToEps(g,"graph_to_eps_demo_out_arr.eps").scale(10).coords(coords).
    1.35      nodeScale(2).nodeSizes(sizes).
    1.36 +    nodeShapes(shapes).
    1.37      nodeColors(composeMap(colorSet,colors)).
    1.38      edgeColors(composeMap(colorSet,ecolors)).
    1.39      edgeWidthScale(.4).edgeWidths(widths).
    1.40 @@ -116,6 +119,7 @@
    1.41  
    1.42    graphToEps(g,"graph_to_eps_demo_out_par.eps").scale(10).coords(coords).
    1.43      nodeScale(2).nodeSizes(sizes).
    1.44 +    nodeShapes(shapes).
    1.45      nodeColors(composeMap(colorSet,colors)).
    1.46      edgeColors(composeMap(colorSet,ecolors)).
    1.47      edgeWidthScale(.4).edgeWidths(widths).
    1.48 @@ -124,10 +128,12 @@
    1.49  
    1.50    graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").scale(10).coords(coords).
    1.51      nodeScale(2).nodeSizes(sizes).
    1.52 +    nodeShapes(shapes).
    1.53      nodeColors(composeMap(colorSet,colors)).
    1.54      edgeColors(composeMap(colorSet,ecolors)).
    1.55      edgeWidthScale(.3).edgeWidths(widths).
    1.56      nodeTexts(id).nodeTextSize(3).
    1.57      enableParallel().parEdgeDist(1).
    1.58 +    //    hideNodes().
    1.59      drawArrows().arrowWidth(1).arrowLength(1);
    1.60  }