diff --git a/doclib/Doxyfile.global b/doclib/Doxyfile.global
index 5d8dbba6240fac5408b101fe1aa9b3c0f314a509..b2d630395b4087bf3332f1afc8cedb28e9a0aa94 100644
--- a/doclib/Doxyfile.global
+++ b/doclib/Doxyfile.global
@@ -36,13 +36,16 @@ GENERATE_XML           = YES
 
 HAVE_DOT               = YES
 CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-TEMPLATE_RELATIONS     = YES
+COLLABORATION_GRAPH    = NO
+TEMPLATE_RELATIONS     = NO
 INCLUDE_GRAPH          = YES
 INCLUDED_BY_GRAPH      = YES
+GROUP_GRAPHS           = NO
 MAX_DOT_GRAPH_WIDTH    = 800
-MAX_DOT_GRAPH_HEIGHT   = 1200
+MAX_DOT_GRAPH_HEIGHT   = 1600
 MAX_DOT_GRAPH_DEPTH    = 3
 DOT_MULTI_TARGETS      = YES
+DOT_CLEANUP            = NO
+DOT_PATH               = "$(TOPDIR)/doclib"
 
 @INCLUDE = "$(TOPDIR)/Doxyfile.local"
diff --git a/doclib/dot b/doclib/dot
new file mode 100755
index 0000000000000000000000000000000000000000..fca62c89c2a8bcf01f1b696b4136cb142cbfa2b4
--- /dev/null
+++ b/doclib/dot
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+topdir="`dirname "$0"`"; topdir="`cd "$topdir/.."; pwd`"
+"$topdir/doclib/dot-munge.pl" "$1"
+exec dot "$@"
diff --git a/doclib/dot-munge.pl b/doclib/dot-munge.pl
new file mode 100755
index 0000000000000000000000000000000000000000..d11a5566863efac67138358ea286cee12e0fd1f5
--- /dev/null
+++ b/doclib/dot-munge.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/perl -i -n
+
+# Reduce font size
+s/fontsize=10/fontsize=8/g; 
+
+# Wrap long labels (templates)
+if (/label=\"([^"]*)\"/) {              		    #"])){ # To make emacs happy ...
+    $pre=$`; 
+    $post=$'; 			                            #'     # To make emacs happy ...
+    $label=$1;
+
+    # Break at each komma
+    $label=~s/,/,\\r\\ \\ \\ \\ \\ \\ \\ \\ /g; 
+
+    # If more than one '<' is in the label, break after each '<'
+    if (($label=~tr/</</)>1) { 
+	$label=~s/</<\\r\\ \\ \\ \\ \\ \\ \\ \\ /g;
+    }
+
+    # If at least one break is in there ...
+    if ($label=~/\\r/) {
+	# Make last line flush right
+	$label.="\\r";
+	# and first line flush left
+	$label=~s/\\r/\\l/;
+    }
+    print "${pre}label=\"${label}\"${post}";
+} else { 
+    print;
+}