Index: demo/graph_to_eps_demo.cc
===================================================================
--- demo/graph_to_eps_demo.cc	(revision 2172)
+++ demo/graph_to_eps_demo.cc	(revision 2178)
@@ -43,4 +43,5 @@
 {
   Palette palette;
+  Palette paletteW(true);
 
   ListGraph g;
@@ -81,4 +82,12 @@
   IdMap<ListGraph,Node> id(g);
 
+  cout << "Create 'graph_to_eps_demo_out_pure.eps'" << endl;
+  graphToEps(g,"graph_to_eps_demo_out_pure.eps").
+    //scale(10).
+    coords(coords).
+    title("Sample .eps figure").
+    copyright("(C) 2006 LEMON Project").
+    run();
+
   cout << "Create 'graph_to_eps_demo_out.eps'" << endl;
   graphToEps(g,"graph_to_eps_demo_out.eps").
@@ -87,4 +96,5 @@
     title("Sample .eps figure").
     copyright("(C) 2006 LEMON Project").
+    absoluteNodeSizes().absoluteEdgeWidths().
     nodeScale(2).nodeSizes(sizes).
     nodeShapes(shapes).
@@ -101,4 +111,5 @@
     title("Sample .eps figure (with arrowheads)").
     copyright("(C) 2006 LEMON Project").
+    absoluteNodeSizes().absoluteEdgeWidths().
     nodeColors(composeMap(palette,colors)).
     coords(coords).
@@ -127,4 +138,5 @@
     title("Sample .eps figure (parallel edges)").
     copyright("(C) 2006 LEMON Project").
+    absoluteNodeSizes().absoluteEdgeWidths().
     nodeShapes(shapes).
     coords(coords).
@@ -142,4 +154,5 @@
     title("Sample .eps figure (parallel edges and arrowheads)").
     copyright("(C) 2006 LEMON Project").
+    absoluteNodeSizes().absoluteEdgeWidths().
     nodeScale(2).nodeSizes(sizes).
     coords(coords).
@@ -157,4 +170,5 @@
     title("Sample .eps figure (fits to A4)").
     copyright("(C) 2006 LEMON Project").
+    absoluteNodeSizes().absoluteEdgeWidths().
     nodeScale(2).nodeSizes(sizes).
     coords(coords).
@@ -173,5 +187,5 @@
   
   int cols=int(sqrt(double(palette.size())));
-  for(int i=0;i<int(palette.size());i++) {
+  for(int i=0;i<int(paletteW.size());i++) {
     Node n=h.addNode();
     hcoords[n]=Xy(i%cols,i/cols);
@@ -185,11 +199,10 @@
     copyright("(C) 2006 LEMON Project").
     coords(hcoords).
-    nodeScale(.45).
+    absoluteNodeSizes().absoluteEdgeWidths().
+    nodeScale(45).
     distantColorNodeTexts().
     //    distantBWNodeTexts().
     nodeTexts(hcolors).nodeTextSize(.6).
-    nodeColors(composeMap(palette,hcolors)).
-    run();
-
-
+    nodeColors(composeMap(paletteW,hcolors)).
+    run();
 }
Index: mon/bezier.h
===================================================================
--- lemon/bezier.h	(revision 1956)
+++ 	(revision )
@@ -1,172 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2006
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef LEMON_BEZIER_H
-#define LEMON_BEZIER_H
-
-///\ingroup misc
-///\file
-///\brief Classes to compute with Bezier curves.
-///
-///Up to now this file is used internally by \ref graph_to_eps.h
-///
-///\author Alpar Juttner
-
-#include<lemon/xy.h>
-
-namespace lemon {
-
-class BezierBase {
-public:
-  typedef xy<double> xy;
-protected:
-  static xy conv(xy x,xy y,double t) {return (1-t)*x+t*y;}
-};
-
-class Bezier1 : public BezierBase
-{
-public:
-  xy p1,p2;
-
-  Bezier1() {}
-  Bezier1(xy _p1, xy _p2) :p1(_p1), p2(_p2) {}
-  
-  xy operator()(double t) const
-  {
-    //    return conv(conv(p1,p2,t),conv(p2,p3,t),t);
-    return conv(p1,p2,t);
-  }
-  Bezier1 before(double t) const
-  {
-    return Bezier1(p1,conv(p1,p2,t));
-  }
-  
-  Bezier1 after(double t) const
-  {
-    return Bezier1(conv(p1,p2,t),p2);
-  }
-
-  Bezier1 revert() const { return Bezier1(p2,p1);}
-  Bezier1 operator()(double a,double b) const { return before(b).after(a/b); }
-  xy grad() const { return p2-p1; }
-  xy norm() const { return rot90(p2-p1); }
-  xy grad(double) const { return grad(); }
-  xy norm(double t) const { return rot90(grad(t)); }
-};
-
-class Bezier2 : public BezierBase
-{
-public:
-  xy p1,p2,p3;
-
-  Bezier2() {}
-  Bezier2(xy _p1, xy _p2, xy _p3) :p1(_p1), p2(_p2), p3(_p3) {}
-  Bezier2(const Bezier1 &b) : p1(b.p1), p2(conv(b.p1,b.p2,.5)), p3(b.p2) {}
-  xy operator()(double t) const
-  {
-    //    return conv(conv(p1,p2,t),conv(p2,p3,t),t);
-    return ((1-t)*(1-t))*p1+(2*(1-t)*t)*p2+(t*t)*p3;
-  }
-  Bezier2 before(double t) const
-  {
-    xy q(conv(p1,p2,t));
-    xy r(conv(p2,p3,t));
-    return Bezier2(p1,q,conv(q,r,t));
-  }
-  
-  Bezier2 after(double t) const
-  {
-    xy q(conv(p1,p2,t));
-    xy r(conv(p2,p3,t));
-    return Bezier2(conv(q,r,t),r,p3);
-  }
-  Bezier2 revert() const { return Bezier2(p3,p2,p1);}
-  Bezier2 operator()(double a,double b) const { return before(b).after(a/b); }
-  Bezier1 grad() const { return Bezier1(2.0*(p2-p1),2.0*(p3-p2)); }
-  Bezier1 norm() const { return Bezier1(2.0*rot90(p2-p1),2.0*rot90(p3-p2)); }
-  xy grad(double t) const { return grad()(t); }
-  xy norm(double t) const { return rot90(grad(t)); }
-};
-
-class Bezier3 : public BezierBase
-{
-public:
-  xy p1,p2,p3,p4;
-
-  Bezier3() {}
-  Bezier3(xy _p1, xy _p2, xy _p3, xy _p4) :p1(_p1), p2(_p2), p3(_p3), p4(_p4) {}
-  Bezier3(const Bezier1 &b) : p1(b.p1), p2(conv(b.p1,b.p2,1.0/3.0)), 
-			      p3(conv(b.p1,b.p2,2.0/3.0)), p4(b.p2) {}
-  Bezier3(const Bezier2 &b) : p1(b.p1), p2(conv(b.p1,b.p2,2.0/3.0)),
-			      p3(conv(b.p2,b.p3,1.0/3.0)), p4(b.p3) {}
-  
-  xy operator()(double t) const 
-    {
-      //    return Bezier2(conv(p1,p2,t),conv(p2,p3,t),conv(p3,p4,t))(t);
-      return ((1-t)*(1-t)*(1-t))*p1+(3*t*(1-t)*(1-t))*p2+
-	(3*t*t*(1-t))*p3+(t*t*t)*p4;
-    }
-  Bezier3 before(double t) const
-    {
-      xy p(conv(p1,p2,t));
-      xy q(conv(p2,p3,t));
-      xy r(conv(p3,p4,t));
-      xy a(conv(p,q,t));
-      xy b(conv(q,r,t));
-      xy c(conv(a,b,t));
-      return Bezier3(p1,p,a,c);
-    }
-  
-  Bezier3 after(double t) const
-    {
-      xy p(conv(p1,p2,t));
-      xy q(conv(p2,p3,t));
-      xy r(conv(p3,p4,t));
-      xy a(conv(p,q,t));
-      xy b(conv(q,r,t));
-      xy c(conv(a,b,t));
-      return Bezier3(c,b,r,p4);
-    }
-  Bezier3 revert() const { return Bezier3(p4,p3,p2,p1);}
-  Bezier3 operator()(double a,double b) const { return before(b).after(a/b); }
-  Bezier2 grad() const { return Bezier2(3.0*(p2-p1),3.0*(p3-p2),3.0*(p4-p3)); }
-  Bezier2 norm() const { return Bezier2(3.0*rot90(p2-p1),
-				  3.0*rot90(p3-p2),
-				  3.0*rot90(p4-p3)); }
-  xy grad(double t) const { return grad()(t); }
-  xy norm(double t) const { return rot90(grad(t)); }
-
-  template<class R,class F,class S,class D>
-  R recSplit(F &_f,const S &_s,D _d) const 
-  {
-    const xy a=(p1+p2)/2;
-    const xy b=(p2+p3)/2;
-    const xy c=(p3+p4)/2;
-    const xy d=(a+b)/2;
-    const xy e=(b+c)/2;
-    const xy f=(d+e)/2;
-    R f1=_f(Bezier3(p1,a,d,e),_d);
-    R f2=_f(Bezier3(e,d,c,p4),_d);
-    return _s(f1,f2);
-  }
-  
-};
-
-} //END OF NAMESPACE LEMON
-
-#endif // LEMON_BEZIER_H
Index: lemon/bits/bezier.h
===================================================================
--- lemon/bits/bezier.h	(revision 2178)
+++ lemon/bits/bezier.h	(revision 2178)
@@ -0,0 +1,172 @@
+/* -*- C++ -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2003-2006
+ * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
+ * (Egervary Research Group on Combinatorial Optimization, EGRES).
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#ifndef LEMON_BEZIER_H
+#define LEMON_BEZIER_H
+
+///\ingroup misc
+///\file
+///\brief Classes to compute with Bezier curves.
+///
+///Up to now this file is used internally by \ref graph_to_eps.h
+///
+///\author Alpar Juttner
+
+#include<lemon/xy.h>
+
+namespace lemon {
+
+class BezierBase {
+public:
+  typedef xy<double> xy;
+protected:
+  static xy conv(xy x,xy y,double t) {return (1-t)*x+t*y;}
+};
+
+class Bezier1 : public BezierBase
+{
+public:
+  xy p1,p2;
+
+  Bezier1() {}
+  Bezier1(xy _p1, xy _p2) :p1(_p1), p2(_p2) {}
+  
+  xy operator()(double t) const
+  {
+    //    return conv(conv(p1,p2,t),conv(p2,p3,t),t);
+    return conv(p1,p2,t);
+  }
+  Bezier1 before(double t) const
+  {
+    return Bezier1(p1,conv(p1,p2,t));
+  }
+  
+  Bezier1 after(double t) const
+  {
+    return Bezier1(conv(p1,p2,t),p2);
+  }
+
+  Bezier1 revert() const { return Bezier1(p2,p1);}
+  Bezier1 operator()(double a,double b) const { return before(b).after(a/b); }
+  xy grad() const { return p2-p1; }
+  xy norm() const { return rot90(p2-p1); }
+  xy grad(double) const { return grad(); }
+  xy norm(double t) const { return rot90(grad(t)); }
+};
+
+class Bezier2 : public BezierBase
+{
+public:
+  xy p1,p2,p3;
+
+  Bezier2() {}
+  Bezier2(xy _p1, xy _p2, xy _p3) :p1(_p1), p2(_p2), p3(_p3) {}
+  Bezier2(const Bezier1 &b) : p1(b.p1), p2(conv(b.p1,b.p2,.5)), p3(b.p2) {}
+  xy operator()(double t) const
+  {
+    //    return conv(conv(p1,p2,t),conv(p2,p3,t),t);
+    return ((1-t)*(1-t))*p1+(2*(1-t)*t)*p2+(t*t)*p3;
+  }
+  Bezier2 before(double t) const
+  {
+    xy q(conv(p1,p2,t));
+    xy r(conv(p2,p3,t));
+    return Bezier2(p1,q,conv(q,r,t));
+  }
+  
+  Bezier2 after(double t) const
+  {
+    xy q(conv(p1,p2,t));
+    xy r(conv(p2,p3,t));
+    return Bezier2(conv(q,r,t),r,p3);
+  }
+  Bezier2 revert() const { return Bezier2(p3,p2,p1);}
+  Bezier2 operator()(double a,double b) const { return before(b).after(a/b); }
+  Bezier1 grad() const { return Bezier1(2.0*(p2-p1),2.0*(p3-p2)); }
+  Bezier1 norm() const { return Bezier1(2.0*rot90(p2-p1),2.0*rot90(p3-p2)); }
+  xy grad(double t) const { return grad()(t); }
+  xy norm(double t) const { return rot90(grad(t)); }
+};
+
+class Bezier3 : public BezierBase
+{
+public:
+  xy p1,p2,p3,p4;
+
+  Bezier3() {}
+  Bezier3(xy _p1, xy _p2, xy _p3, xy _p4) :p1(_p1), p2(_p2), p3(_p3), p4(_p4) {}
+  Bezier3(const Bezier1 &b) : p1(b.p1), p2(conv(b.p1,b.p2,1.0/3.0)), 
+			      p3(conv(b.p1,b.p2,2.0/3.0)), p4(b.p2) {}
+  Bezier3(const Bezier2 &b) : p1(b.p1), p2(conv(b.p1,b.p2,2.0/3.0)),
+			      p3(conv(b.p2,b.p3,1.0/3.0)), p4(b.p3) {}
+  
+  xy operator()(double t) const 
+    {
+      //    return Bezier2(conv(p1,p2,t),conv(p2,p3,t),conv(p3,p4,t))(t);
+      return ((1-t)*(1-t)*(1-t))*p1+(3*t*(1-t)*(1-t))*p2+
+	(3*t*t*(1-t))*p3+(t*t*t)*p4;
+    }
+  Bezier3 before(double t) const
+    {
+      xy p(conv(p1,p2,t));
+      xy q(conv(p2,p3,t));
+      xy r(conv(p3,p4,t));
+      xy a(conv(p,q,t));
+      xy b(conv(q,r,t));
+      xy c(conv(a,b,t));
+      return Bezier3(p1,p,a,c);
+    }
+  
+  Bezier3 after(double t) const
+    {
+      xy p(conv(p1,p2,t));
+      xy q(conv(p2,p3,t));
+      xy r(conv(p3,p4,t));
+      xy a(conv(p,q,t));
+      xy b(conv(q,r,t));
+      xy c(conv(a,b,t));
+      return Bezier3(c,b,r,p4);
+    }
+  Bezier3 revert() const { return Bezier3(p4,p3,p2,p1);}
+  Bezier3 operator()(double a,double b) const { return before(b).after(a/b); }
+  Bezier2 grad() const { return Bezier2(3.0*(p2-p1),3.0*(p3-p2),3.0*(p4-p3)); }
+  Bezier2 norm() const { return Bezier2(3.0*rot90(p2-p1),
+				  3.0*rot90(p3-p2),
+				  3.0*rot90(p4-p3)); }
+  xy grad(double t) const { return grad()(t); }
+  xy norm(double t) const { return rot90(grad(t)); }
+
+  template<class R,class F,class S,class D>
+  R recSplit(F &_f,const S &_s,D _d) const 
+  {
+    const xy a=(p1+p2)/2;
+    const xy b=(p2+p3)/2;
+    const xy c=(p3+p4)/2;
+    const xy d=(a+b)/2;
+    const xy e=(b+c)/2;
+    const xy f=(d+e)/2;
+    R f1=_f(Bezier3(p1,a,d,e),_d);
+    R f2=_f(Bezier3(e,d,c,p4),_d);
+    return _s(f1,f2);
+  }
+  
+};
+
+} //END OF NAMESPACE LEMON
+
+#endif // LEMON_BEZIER_H
Index: lemon/graph_to_eps.h
===================================================================
--- lemon/graph_to_eps.h	(revision 2174)
+++ lemon/graph_to_eps.h	(revision 2178)
@@ -39,5 +39,5 @@
 #include<lemon/maps.h>
 #include<lemon/color.h>
-#include<lemon/bezier.h>
+#include<lemon/bits/bezier.h>
 
 
@@ -131,4 +131,7 @@
   bool _autoEdgeWidthScale;
 
+  bool _absoluteNodeSizes;
+  bool _absoluteEdgeWidths;
+
   bool _negY;
   ///Constructor
@@ -144,7 +147,7 @@
 			  bool _pros=false) :
     g(_g), os(_os),
-    _coords(xy<double>(1,1)), _nodeSizes(1.0), _nodeShapes(0),
+    _coords(xy<double>(1,1)), _nodeSizes(.01), _nodeShapes(0),
     _nodeColors(WHITE), _edgeColors(BLACK),
-    _edgeWidths(1), _edgeWidthScale(0.3),
+    _edgeWidths(1.0), _edgeWidthScale(0.003),
     _nodeScale(1.0), _xBorder(10), _yBorder(10), _scale(1.0),
     _nodeBorderQuotient(.1),
@@ -159,4 +162,6 @@
     _autoNodeScale(false),
     _autoEdgeWidthScale(false),
+    _absoluteNodeSizes(false),
+    _absoluteEdgeWidths(false),
     _negY(false)
   {}
@@ -229,4 +234,8 @@
   using T::_autoNodeScale;
   using T::_autoEdgeWidthScale;
+
+  using T::_absoluteNodeSizes;
+  using T::_absoluteEdgeWidths;
+
 
   using T::_negY;
@@ -479,4 +488,6 @@
   /// node sizes will be scaled in such a way that the greatest size will be
   /// equal to \c d.
+  /// \sa nodeSizes()
+  /// \sa autoNodeScale()
   GraphToEps<T> &nodeScale(double d) {_nodeScale=d;return *this;}
   ///Turns on/off the automatic node width scaling.
@@ -488,4 +499,14 @@
   GraphToEps<T> &autoNodeScale(bool b=true) {
     _autoNodeScale=b;return *this;
+  }
+
+  ///Turns on/off the absolutematic node width scaling.
+
+  ///Turns on/off the absolutematic node width scaling.
+  ///
+  ///\sa nodeScale()
+  ///
+  GraphToEps<T> &absoluteNodeSizes(bool b=true) {
+    _absoluteNodeSizes=b;return *this;
   }
 
@@ -520,4 +541,13 @@
   GraphToEps<T> &autoEdgeWidthScale(bool b=true) {
     _autoEdgeWidthScale=b;return *this;
+  }
+  ///Turns on/off the absolutematic edge width scaling.
+
+  ///Turns on/off the absolutematic edge width scaling.
+  ///
+  ///\sa edgeWidthScale()
+  ///
+  GraphToEps<T> &absoluteEdgeWidths(bool b=true) {
+    _absoluteEdgeWidths=b;return *this;
   }
   ///Sets a global scale factor for the whole picture
@@ -665,4 +695,6 @@
   ///it draws the graph.
   void run() {
+    ///\todo better 'epsilon' would be nice here.
+    const double EPSILON=1e-9;
     if(dontPrint) return;
     
@@ -688,5 +720,5 @@
 	max_w=std::max(double(_edgeWidths[e]),max_w);
       ///\todo better 'epsilon' would be nice here.
-      if(max_w>1e-9) {
+      if(max_w>EPSILON) {
 	_edgeWidthScale/=max_w;
       }
@@ -698,12 +730,23 @@
 	max_s=std::max(double(_nodeSizes[n]),max_s);
       ///\todo better 'epsilon' would be nice here.
-      if(max_s>1e-9) {
+      if(max_s>EPSILON) {
 	_nodeScale/=max_s;
       }
     }
 
-
+    double diag_len = 1;
+    if(!(_absoluteNodeSizes&&_absoluteEdgeWidths)) {
+      BoundingBox<double> bb;
+      for(NodeIt n(g);n!=INVALID;++n) bb.add(mycoords[n]);
+      if (bb.empty()) {
+	bb = BoundingBox<double>(xy<double>(0,0));
+      }
+      diag_len = std::sqrt((bb.bottomLeft()-bb.topRight()).normSquare());
+      if(diag_len<EPSILON) diag_len = 1;
+      if(!_absoluteNodeSizes) _nodeScale*=diag_len;
+      if(!_absoluteEdgeWidths) _edgeWidthScale*=diag_len;
+    }
+    
     BoundingBox<double> bb;
-    ///\bug: Chech whether the graph is empty.
     for(NodeIt n(g);n!=INVALID;++n) {
       double ns=_nodeSizes[n]*_nodeScale;
@@ -865,5 +908,5 @@
 	  double l=std::sqrt(dvec.normSquare()); 
 	  ///\todo better 'epsilon' would be nice here.
-	  xy<double> d(dvec/std::max(l,1e-9));
+	  xy<double> d(dvec/std::max(l,EPSILON));
  	  xy<double> m;
 // 	  m=xy<double>(mycoords[g.target(*i)]+mycoords[g.source(*i)])/2.0;
