COIN-OR::LEMON - Graph Library

Ticket #110: graph_to_eps_improvements.patch

File graph_to_eps_improvements.patch, 21.7 KB (added by Peter Kovacs, 17 years ago)

Some improvements in the doc and in the demo file.

  • demo/graph_to_eps_demo.cc

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1215259968 -7200
    # Node ID 769a76ee7c48f0a6183eabafda1dd5e2ff3844c6
    # Parent  1e6af6f0843c373a0579fc699ac4a83bb4f5948a
    Improvements related to graphToEps()
    
    diff -r 1e6af6f0843c -r 769a76ee7c48 demo/graph_to_eps_demo.cc
    a b  
    1818
    1919/// \ingroup demos
    2020/// \file
    21 /// \brief Demo of the graph grawing function \ref graphToEps()
     21/// \brief Demo of the graph drawing function \ref graphToEps()
    2222///
    2323/// This demo program shows examples how to  use the function \ref
    2424/// graphToEps(). It takes no input but simply creates  six
    2525/// <tt>.eps</tt> files demonstrating the capability of \ref
    26 /// graphToEps(), and showing how to draw directed/graphs,
     26/// graphToEps(), and showing how to draw directed graphs,
    2727/// how to handle parallel egdes, how to change the properties (like
    2828/// color, shape, size, title etc.) of nodes and arcs individually
    2929/// using appropriate \ref maps-page "graph maps".
    3030///
    3131/// \include graph_to_eps_demo.cc
    3232
    33 #include <lemon/math.h>
    34 
    35 #include<lemon/graph_to_eps.h>
    3633#include<lemon/list_graph.h>
    3734#include<lemon/graph_utils.h>
     35#include<lemon/graph_to_eps.h>
     36#include<lemon/math.h>
    3837
    3938using namespace std;
    4039using namespace lemon;
     
    4443  Palette palette;
    4544  Palette paletteW(true);
    4645
     46  // Create a small digraph
    4747  ListDigraph g;
    4848  typedef ListDigraph::Node Node;
    4949  typedef ListDigraph::NodeIt NodeIt;
     
    6060  ListDigraph::NodeMap<double> sizes(g);
    6161  ListDigraph::NodeMap<int> colors(g);
    6262  ListDigraph::NodeMap<int> shapes(g);
    63   ListDigraph::ArcMap<int> ecolors(g);
     63  ListDigraph::ArcMap<int> acolors(g);
    6464  ListDigraph::ArcMap<int> widths(g);
    6565 
    6666  coords[n1]=Point(50,50);  sizes[n1]=1; colors[n1]=1; shapes[n1]=0;
     
    7171 
    7272  Arc e;
    7373
    74   e=g.addArc(n1,n2); ecolors[e]=0; widths[e]=1;
    75   e=g.addArc(n2,n3); ecolors[e]=0; widths[e]=1;
    76   e=g.addArc(n3,n5); ecolors[e]=0; widths[e]=3;
    77   e=g.addArc(n5,n4); ecolors[e]=0; widths[e]=1;
    78   e=g.addArc(n4,n1); ecolors[e]=0; widths[e]=1;
    79   e=g.addArc(n2,n4); ecolors[e]=1; widths[e]=2;
    80   e=g.addArc(n3,n4); ecolors[e]=2; widths[e]=1;
     74  e=g.addArc(n1,n2); acolors[e]=0; widths[e]=1;
     75  e=g.addArc(n2,n3); acolors[e]=0; widths[e]=1;
     76  e=g.addArc(n3,n5); acolors[e]=0; widths[e]=3;
     77  e=g.addArc(n5,n4); acolors[e]=0; widths[e]=1;
     78  e=g.addArc(n4,n1); acolors[e]=0; widths[e]=1;
     79  e=g.addArc(n2,n4); acolors[e]=1; widths[e]=2;
     80  e=g.addArc(n3,n4); acolors[e]=2; widths[e]=1;
    8181 
    8282  IdMap<ListDigraph,Node> id(g);
    8383
    84   cout << "Create 'graph_to_eps_demo_out_pure.eps'" << endl;
    85   graphToEps(g,"graph_to_eps_demo_out_pure.eps").
    86     //scale(10).
     84  // Create five .eps files showing the digraph with different options
     85  cout << "Create 'graph_to_eps_demo_out_1_pure.eps'" << endl;
     86  graphToEps(g,"graph_to_eps_demo_out_1_pure.eps").
    8787    coords(coords).
    8888    title("Sample .eps figure").
    89     copyright("(C) 2003-2007 LEMON Project").
     89    copyright("(C) 2003-2008 LEMON Project").
    9090    run();
    9191
    92   cout << "Create 'graph_to_eps_demo_out.eps'" << endl;
    93   graphToEps(g,"graph_to_eps_demo_out.eps").
    94     //scale(10).
     92  cout << "Create 'graph_to_eps_demo_out_2.eps'" << endl;
     93  graphToEps(g,"graph_to_eps_demo_out_2.eps").
    9594    coords(coords).
    9695    title("Sample .eps figure").
    97     copyright("(C) 2003-2007 LEMON Project").
     96    copyright("(C) 2003-2008 LEMON Project").
    9897    absoluteNodeSizes().absoluteArcWidths().
    9998    nodeScale(2).nodeSizes(sizes).
    10099    nodeShapes(shapes).
    101100    nodeColors(composeMap(palette,colors)).
    102     arcColors(composeMap(palette,ecolors)).
     101    arcColors(composeMap(palette,acolors)).
    103102    arcWidthScale(.4).arcWidths(widths).
    104103    nodeTexts(id).nodeTextSize(3).
    105104    run();
    106105
    107 
    108   cout << "Create 'graph_to_eps_demo_out_arr.eps'" << endl;
    109   graphToEps(g,"graph_to_eps_demo_out_arr.eps").
    110     //scale(10).
     106  cout << "Create 'graph_to_eps_demo_out_3_arr.eps'" << endl;
     107  graphToEps(g,"graph_to_eps_demo_out_3_arr.eps").
    111108    title("Sample .eps figure (with arrowheads)").
    112     copyright("(C) 2003-2007 LEMON Project").
     109    copyright("(C) 2003-2008 LEMON Project").
    113110    absoluteNodeSizes().absoluteArcWidths().
    114111    nodeColors(composeMap(palette,colors)).
    115112    coords(coords).
    116113    nodeScale(2).nodeSizes(sizes).
    117114    nodeShapes(shapes).
    118     arcColors(composeMap(palette,ecolors)).
     115    arcColors(composeMap(palette,acolors)).
    119116    arcWidthScale(.4).arcWidths(widths).
    120117    nodeTexts(id).nodeTextSize(3).
    121     drawArrows().arrowWidth(1).arrowLength(1).
     118    drawArrows().arrowWidth(2).arrowLength(2).
    122119    run();
    123120
    124   e=g.addArc(n1,n4); ecolors[e]=2; widths[e]=1;
    125   e=g.addArc(n4,n1); ecolors[e]=1; widths[e]=2;
     121  e=g.addArc(n1,n4); acolors[e]=2; widths[e]=1;
     122  e=g.addArc(n4,n1); acolors[e]=1; widths[e]=2;
    126123
    127   e=g.addArc(n1,n2); ecolors[e]=1; widths[e]=1;
    128   e=g.addArc(n1,n2); ecolors[e]=2; widths[e]=1;
    129   e=g.addArc(n1,n2); ecolors[e]=3; widths[e]=1;
    130   e=g.addArc(n1,n2); ecolors[e]=4; widths[e]=1;
    131   e=g.addArc(n1,n2); ecolors[e]=5; widths[e]=1;
    132   e=g.addArc(n1,n2); ecolors[e]=6; widths[e]=1;
    133   e=g.addArc(n1,n2); ecolors[e]=7; widths[e]=1;
     124  e=g.addArc(n1,n2); acolors[e]=1; widths[e]=1;
     125  e=g.addArc(n1,n2); acolors[e]=2; widths[e]=1;
     126  e=g.addArc(n1,n2); acolors[e]=3; widths[e]=1;
     127  e=g.addArc(n1,n2); acolors[e]=4; widths[e]=1;
     128  e=g.addArc(n1,n2); acolors[e]=5; widths[e]=1;
     129  e=g.addArc(n1,n2); acolors[e]=6; widths[e]=1;
     130  e=g.addArc(n1,n2); acolors[e]=7; widths[e]=1;
    134131
    135   cout << "Create 'graph_to_eps_demo_out_par.eps'" << endl;
    136   graphToEps(g,"graph_to_eps_demo_out_par.eps").
    137     //scale(10).
    138     title("Sample .eps figure (parallel arcs)").
    139     copyright("(C) 2003-2007 LEMON Project").
    140     absoluteNodeSizes().absoluteArcWidths().
    141     nodeShapes(shapes).
    142     coords(coords).
    143     nodeScale(2).nodeSizes(sizes).
    144     nodeColors(composeMap(palette,colors)).
    145     arcColors(composeMap(palette,ecolors)).
    146     arcWidthScale(.4).arcWidths(widths).
    147     nodeTexts(id).nodeTextSize(3).
    148     enableParallel().parArcDist(1.5).
    149     run();
    150  
    151   cout << "Create 'graph_to_eps_demo_out_par_arr.eps'" << endl;
    152   graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").
    153     //scale(10).
     132  cout << "Create 'graph_to_eps_demo_out_4_par_arr.eps'" << endl;
     133  graphToEps(g,"graph_to_eps_demo_out_4_par_arr.eps").
    154134    title("Sample .eps figure (parallel arcs and arrowheads)").
    155     copyright("(C) 2003-2007 LEMON Project").
     135    copyright("(C) 2003-2008 LEMON Project").
    156136    absoluteNodeSizes().absoluteArcWidths().
    157137    nodeScale(2).nodeSizes(sizes).
    158138    coords(coords).
    159139    nodeShapes(shapes).
    160140    nodeColors(composeMap(palette,colors)).
    161     arcColors(composeMap(palette,ecolors)).
     141    arcColors(composeMap(palette,acolors)).
    162142    arcWidthScale(.3).arcWidths(widths).
    163143    nodeTexts(id).nodeTextSize(3).
    164144    enableParallel().parArcDist(1).
    165145    drawArrows().arrowWidth(1).arrowLength(1).
    166146    run();
    167147
    168   cout << "Create 'graph_to_eps_demo_out_a4.eps'" << endl;
    169   graphToEps(g,"graph_to_eps_demo_out_a4.eps").scaleToA4().
     148  cout << "Create 'graph_to_eps_demo_out_5_par_arr_a4.eps'" << endl;
     149  graphToEps(g,"graph_to_eps_demo_out_5_par_arr_a4.eps").
    170150    title("Sample .eps figure (fits to A4)").
    171     copyright("(C) 2003-2007 LEMON Project").
     151    copyright("(C) 2003-2008 LEMON Project").
     152    scaleToA4().
    172153    absoluteNodeSizes().absoluteArcWidths().
    173154    nodeScale(2).nodeSizes(sizes).
    174155    coords(coords).
    175156    nodeShapes(shapes).
    176157    nodeColors(composeMap(palette,colors)).
    177     arcColors(composeMap(palette,ecolors)).
     158    arcColors(composeMap(palette,acolors)).
    178159    arcWidthScale(.3).arcWidths(widths).
    179160    nodeTexts(id).nodeTextSize(3).
    180161    enableParallel().parArcDist(1).
    181162    drawArrows().arrowWidth(1).arrowLength(1).
    182163    run();
    183164
     165  // Create an .eps file showing the colors of a default Palette
    184166  ListDigraph h;
    185167  ListDigraph::NodeMap<int> hcolors(h);
    186168  ListDigraph::NodeMap<Point> hcoords(h);
     
    188170  int cols=int(sqrt(double(palette.size())));
    189171  for(int i=0;i<int(paletteW.size());i++) {
    190172    Node n=h.addNode();
    191     hcoords[n]=Point(i%cols,i/cols);
     173    hcoords[n]=Point(1+i%cols,1+i/cols);
    192174    hcolors[n]=i;
    193175  }
    194176 
    195   cout << "Create 'graph_to_eps_demo_out_colors.eps'" << endl;
    196   graphToEps(h,"graph_to_eps_demo_out_colors.eps").
    197     //scale(60).
     177  cout << "Create 'graph_to_eps_demo_out_6_colors.eps'" << endl;
     178  graphToEps(h,"graph_to_eps_demo_out_6_colors.eps").
     179    scale(60).
    198180    title("Sample .eps figure (Palette demo)").
    199     copyright("(C) 2003-2007 LEMON Project").
     181    copyright("(C) 2003-2008 LEMON Project").
    200182    coords(hcoords).
    201183    absoluteNodeSizes().absoluteArcWidths().
    202184    nodeScale(.45).
    203185    distantColorNodeTexts().
    204     //    distantBWNodeTexts().
    205186    nodeTexts(hcolors).nodeTextSize(.6).
    206187    nodeColors(composeMap(paletteW,hcolors)).
    207188    run();
     189   
     190  return 0;
    208191}
  • lemon/color.h

    diff -r 1e6af6f0843c -r 769a76ee7c48 lemon/color.h
    a b  
    108108  public:
    109109    ///Constructor
    110110
    111     ///Constructor 
    112     ///\param have_white indicates whether white is amongst the
     111    ///Constructor.
     112    ///\param have_white Indicates whether white is among the
    113113    ///provided initial colors (\c true) or not (\c false). If it is true,
    114114    ///white will be assigned to \c 0.
    115     ///\param num the number of the allocated colors. If it is \c -1,
     115    ///\param num The number of the allocated colors. If it is \c -1,
    116116    ///the default color configuration is set up (26 color plus optionaly the
    117117    ///white).  If \c num is less then 26/27 then the default color
    118118    ///list is cut. Otherwise the color list is filled repeatedly with
     
    153153        colors.push_back(Color(0,.5,1));
    154154        colors.push_back(Color(.5,0,1));
    155155      } while(int(colors.size())<num);
    156       //    colors.push_back(Color(1,1,1));
    157156      if(num>=0) colors.resize(num);
    158157    }
    159158    ///\e
     
    171170    {
    172171      colors[i%colors.size()]=c;
    173172    }
    174     ///Add a new color to the end of the color list.
     173    ///Adds a new color to the end of the color list.
    175174    void add(const Color &c)
    176175    {
    177176      colors.push_back(c);
    178177    }
    179178
    180     ///Sets the number of the exiting colors.
     179    ///Sets the number of the existing colors.
    181180    void resize(int s) { colors.resize(s);}
    182181    ///Returns the number of the existing colors.
    183182    int size() const { return int(colors.size());}
  • lemon/graph_to_eps.h

    diff -r 1e6af6f0843c -r 769a76ee7c48 lemon/graph_to_eps.h
    a b  
    6363 
    6464///Default traits class of \ref GraphToEps
    6565
    66 ///Default traits class of \ref GraphToEps
     66///Default traits class of \ref GraphToEps.
    6767///
    6868///\c G is the type of the underlying graph.
    6969template<class G>
     
    140140  ///Constructor
    141141
    142142  ///Constructor
    143   ///\param _g is a reference to the graph to be printed
    144   ///\param _os is a reference to the output stream.
    145   ///\param _os is a reference to the output stream.
     143  ///\param _g  Reference to the graph to be printed.
     144  ///\param _os Reference to the output stream.
     145  ///\param _os Reference to the output stream. By default it is <tt>std::cout</tt>.
    146146  ///\param _pros If it is \c true, then the \c ostream referenced by \c _os
    147147  ///will be explicitly deallocated by the destructor.
    148   ///By default it is <tt>std::cout</tt>
    149148  DefaultGraphToEpsTraits(const G &_g,std::ostream& _os=std::cout,
    150149                          bool _pros=false) :
    151150    g(_g), os(_os),
     
    173172
    174173///Auxiliary class to implement the named parameters of \ref graphToEps()
    175174
    176 ///Auxiliary class to implement the named parameters of \ref graphToEps()
     175///Auxiliary class to implement the named parameters of \ref graphToEps().
     176///
     177///For detailed examples see the \ref graph_to_eps_demo.cc demo file.
    177178template<class T> class GraphToEps : public T
    178179{
    179180  // Can't believe it is required by the C++ standard
     
    258259public:
    259260  ///Node shapes
    260261
    261   ///Node shapes
     262  ///Node shapes.
    262263  ///
    263264  enum NodeShapes {
    264265    /// = 0
     
    335336  ///Sets the map of the node coordinates
    336337
    337338  ///Sets the map of the node coordinates.
    338   ///\param x must be a node map with dim2::Point<double> or
     339  ///\param x must be a node map with \ref dim2::Point "dim2::Point<double>" or
    339340  ///\ref dim2::Point "dim2::Point<int>" values.
    340341  template<class X> GraphToEps<CoordsTraits<X> > coords(const X &x) {
    341342    dontPrint=true;
     
    347348  };
    348349  ///Sets the map of the node sizes
    349350
    350   ///Sets the map of the node sizes
     351  ///Sets the map of the node sizes.
    351352  ///\param x must be a node map with \c double (or convertible) values.
    352353  template<class X> GraphToEps<NodeSizesTraits<X> > nodeSizes(const X &x)
    353354  {
     
    376377  };
    377378  ///Sets the text printed on the nodes
    378379
    379   ///Sets the text printed on the nodes
     380  ///Sets the text printed on the nodes.
    380381  ///\param x must be a node map with type that can be pushed to a standard
    381   ///ostream.
     382  ///\c ostream.
    382383  template<class X> GraphToEps<NodeTextsTraits<X> > nodeTexts(const X &x)
    383384  {
    384385    dontPrint=true;
     
    393394
    394395  ///With this command it is possible to insert a verbatim PostScript
    395396  ///block to the nodes.
    396   ///The PS current point will be moved to the centre of the node before
     397  ///The PS current point will be moved to the center of the node before
    397398  ///the PostScript block inserted.
    398399  ///
    399400  ///Before and after the block a newline character is inserted so you
    400401  ///don't have to bother with the separators.
    401402  ///
    402403  ///\param x must be a node map with type that can be pushed to a standard
    403   ///ostream.
     404  ///\c ostream.
    404405  ///
    405406  ///\sa nodePsTextsPreamble()
    406407  template<class X> GraphToEps<NodePsTextsTraits<X> > nodePsTexts(const X &x)
     
    415416  };
    416417  ///Sets the map of the arc widths
    417418
    418   ///Sets the map of the arc widths
     419  ///Sets the map of the arc widths.
    419420  ///\param x must be an arc map with \c double (or convertible) values.
    420421  template<class X> GraphToEps<ArcWidthsTraits<X> > arcWidths(const X &x)
    421422  {
     
    429430  };
    430431  ///Sets the map of the node colors
    431432
    432   ///Sets the map of the node colors
     433  ///Sets the map of the node colors.
    433434  ///\param x must be a node map with \ref Color values.
    434435  ///
    435436  ///\sa Palette
     
    445446  };
    446447  ///Sets the map of the node text colors
    447448
    448   ///Sets the map of the node text colors
     449  ///Sets the map of the node text colors.
    449450  ///\param x must be a node map with \ref Color values.
    450451  ///
    451452  ///\sa Palette
     
    463464  };
    464465  ///Sets the map of the arc colors
    465466
    466   ///Sets the map of the arc colors
     467  ///Sets the map of the arc colors.
    467468  ///\param x must be an arc map with \ref Color values.
    468469  ///
    469470  ///\sa Palette
     
    487488  /// \sa nodeSizes()
    488489  /// \sa autoNodeScale()
    489490  GraphToEps<T> &nodeScale(double d=.01) {_nodeScale=d;return *this;}
    490   ///Turns on/off the automatic node width scaling.
     491  ///Turns on/off the automatic node size scaling.
    491492
    492   ///Turns on/off the automatic node width scaling.
     493  ///Turns on/off the automatic node size scaling.
    493494  ///
    494495  ///\sa nodeScale()
    495496  ///
     
    497498    _autoNodeScale=b;return *this;
    498499  }
    499500
    500   ///Turns on/off the absolutematic node width scaling.
     501  ///Turns on/off the absolutematic node size scaling.
    501502
    502   ///Turns on/off the absolutematic node width scaling.
     503  ///Turns on/off the absolutematic node size scaling.
    503504  ///
    504505  ///\sa nodeScale()
    505506  ///
     
    508509  }
    509510
    510511  ///Negates the Y coordinates.
    511 
    512   ///Negates the Y coordinates.
    513   ///
    514512  GraphToEps<T> &negateY(bool b=true) {
    515513    _negY=b;return *this;
    516514  }
     
    557555    _absoluteArcWidths=b;return *this;
    558556  }
    559557  ///Sets a global scale factor for the whole picture
    560 
    561   ///Sets a global scale factor for the whole picture
    562   ///
    563 
    564558  GraphToEps<T> &scale(double d) {_scale=d;return *this;}
    565559  ///Sets the width of the border around the picture
    566 
    567   ///Sets the width of the border around the picture
    568   ///
    569560  GraphToEps<T> &border(double b=10) {_xBorder=_yBorder=b;return *this;}
    570561  ///Sets the width of the border around the picture
    571 
    572   ///Sets the width of the border around the picture
    573   ///
    574562  GraphToEps<T> &border(double x, double y) {
    575563    _xBorder=x;_yBorder=y;return *this;
    576564  }
    577565  ///Sets whether to draw arrows
    578 
    579   ///Sets whether to draw arrows
    580   ///
    581566  GraphToEps<T> &drawArrows(bool b=true) {_drawArrows=b;return *this;}
    582567  ///Sets the length of the arrowheads
    583 
    584   ///Sets the length of the arrowheads
    585   ///
    586568  GraphToEps<T> &arrowLength(double d=1.0) {_arrowLength*=d;return *this;}
    587569  ///Sets the width of the arrowheads
    588 
    589   ///Sets the width of the arrowheads
    590   ///
    591570  GraphToEps<T> &arrowWidth(double d=.3) {_arrowWidth*=d;return *this;}
    592571 
    593572  ///Scales the drawing to fit to A4 page
    594 
    595   ///Scales the drawing to fit to A4 page
    596   ///
    597573  GraphToEps<T> &scaleToA4() {_scaleToA4=true;return *this;}
    598574 
    599575  ///Enables parallel arcs
    600 
    601   ///Enables parallel arcs
    602576  GraphToEps<T> &enableParallel(bool b=true) {_enableParallel=b;return *this;}
    603577 
    604   ///Sets the distance
    605  
    606   ///Sets the distance
    607   ///
     578  ///Sets the distance between parallel arcs
    608579  GraphToEps<T> &parArcDist(double d) {_parArcDist*=d;return *this;}
    609580 
    610581  ///Hides the arcs
    611  
    612   ///Hides the arcs
    613   ///
    614582  GraphToEps<T> &hideArcs(bool b=true) {_showArcs=!b;return *this;}
    615583  ///Hides the nodes
    616  
    617   ///Hides the nodes
    618   ///
    619584  GraphToEps<T> &hideNodes(bool b=true) {_showNodes=!b;return *this;}
    620585 
    621586  ///Sets the size of the node texts
    622  
    623   ///Sets the size of the node texts
    624   ///
    625587  GraphToEps<T> &nodeTextSize(double d) {_nodeTextSize=d;return *this;}
    626588
    627589  ///Sets the color of the node texts to be different from the node color
    628590
    629591  ///Sets the color of the node texts to be as different from the node color
    630   ///as it is possible
    631   ///
     592  ///as it is possible.
    632593  GraphToEps<T> &distantColorNodeTexts()
    633594  {_nodeTextColorType=DIST_COL;return *this;}
    634595  ///Sets the color of the node texts to be black or white and always visible.
    635596
    636597  ///Sets the color of the node texts to be black or white according to
    637   ///which is more
    638   ///different from the node color
    639   ///
     598  ///which is more different from the node color.
    640599  GraphToEps<T> &distantBWNodeTexts()
    641600  {_nodeTextColorType=DIST_BW;return *this;}
    642601
     
    648607  GraphToEps<T> & nodePsTextsPreamble(const char *str) {
    649608    _nodePsTextsPreamble=str ;return *this;
    650609  }
    651   ///Sets whether the the graph is undirected
     610  ///Sets whether the graph is undirected
    652611
    653   ///Sets whether the the graph is undirected.
     612  ///Sets whether the graph is undirected.
    654613  ///
    655614  ///This setting is the default for undirected graphs.
    656615  ///
    657616  ///\sa directed()
    658617   GraphToEps<T> &undirected(bool b=true) {_undirected=b;return *this;}
    659618
    660   ///Sets whether the the graph is directed
     619  ///Sets whether the graph is directed
    661620
    662   ///Sets whether the the graph is directed.
     621  ///Sets whether the graph is directed.
    663622  ///Use it to show the edges as a pair of directed ones.
    664623  ///
    665624  ///This setting is the default for digraphs.
     
    716675    os << "%!PS-Adobe-2.0 EPSF-2.0\n";
    717676    if(_title.size()>0) os << "%%Title: " << _title << '\n';
    718677     if(_copyright.size()>0) os << "%%Copyright: " << _copyright << '\n';
    719 //        << "%%Copyright: XXXX\n"
    720678    os << "%%Creator: LEMON, graphToEps()\n";
    721679
    722680    {   
     
    748706      double max_w=0;
    749707      for(ArcIt e(g);e!=INVALID;++e)
    750708        max_w=std::max(double(_arcWidths[e]),max_w);
    751       ///\todo better 'epsilon' would be nice here.
     709      //\todo better 'epsilon' would be nice here.
    752710      if(max_w>EPSILON) {
    753711        _arcWidthScale/=max_w;
    754712      }
     
    758716      double max_s=0;
    759717      for(NodeIt n(g);n!=INVALID;++n)
    760718        max_s=std::max(double(_nodeSizes[n]),max_s);
    761       ///\todo better 'epsilon' would be nice here.
     719      //\todo better 'epsilon' would be nice here.
    762720      if(max_s>EPSILON) {
    763721        _nodeScale/=max_s;
    764722      }
     
    11141072  ///@{
    11151073
    11161074  ///An alias for arcWidths()
    1117 
    1118   ///An alias for arcWidths()
    1119   ///
    11201075  template<class X> GraphToEps<ArcWidthsTraits<X> > edgeWidths(const X &x)
    11211076  {
    11221077    return arcWidths(x);
    11231078  }
    11241079
    11251080  ///An alias for arcColors()
    1126 
    1127   ///An alias for arcColors()
    1128   ///
    11291081  template<class X> GraphToEps<ArcColorsTraits<X> >
    11301082  edgeColors(const X &x)
    11311083  {
     
    11331085  }
    11341086
    11351087  ///An alias for arcWidthScale()
    1136 
    1137   ///An alias for arcWidthScale()
    1138   ///
    11391088  GraphToEps<T> &edgeWidthScale(double d) {return arcWidthScale(d);}
    11401089
    11411090  ///An alias for autoArcWidthScale()
    1142 
    1143   ///An alias for autoArcWidthScale()
    1144   ///
    11451091  GraphToEps<T> &autoEdgeWidthScale(bool b=true)
    11461092  {
    11471093    return autoArcWidthScale(b);
    11481094  }
    11491095 
    11501096  ///An alias for absoluteArcWidths()
    1151 
    1152   ///An alias for absoluteArcWidths()
    1153   ///
    11541097  GraphToEps<T> &absoluteEdgeWidths(bool b=true)
    11551098  {
    11561099    return absoluteArcWidths(b);
    11571100  }
    11581101 
    11591102  ///An alias for parArcDist()
    1160 
    1161   ///An alias for parArcDist()
    1162   ///
    11631103  GraphToEps<T> &parEdgeDist(double d) {return parArcDist(d);}
    11641104 
    11651105  ///An alias for hideArcs()
    1166  
    1167   ///An alias for hideArcs()
    1168   ///
    11691106  GraphToEps<T> &hideEdges(bool b=true) {return hideArcs(b);}
    11701107
    11711108  ///@}
     
    11851122
    11861123///\ingroup eps_io
    11871124///Generates an EPS file from a graph.
    1188 ///\param g is a reference to the graph to be printed
    1189 ///\param os is a reference to the output stream.
    1190 ///By default it is <tt>std::cout</tt>
     1125///\param g Reference to the graph to be printed.
     1126///\param os Reference to the output stream.
     1127///By default it is <tt>std::cout</tt>.
    11911128///
    11921129///This function also has a lot of
    11931130///\ref named-templ-func-param "named parameters",
     
    11981135///              .nodeScale(2).nodeSizes(sizes)
    11991136///              .arcWidthScale(.4).run();
    12001137///\endcode
     1138///
     1139///For more detailed examples see the \ref graph_to_eps_demo.cc demo file.
     1140///
    12011141///\warning Don't forget to put the \ref GraphToEps::run() "run()"
    12021142///to the end of the parameter list.
    12031143///\sa GraphToEps