Index: trunk/tools/czartool/Plotter.pm
===================================================================
--- trunk/tools/czartool/Plotter.pm	(revision 29951)
+++ trunk/tools/czartool/Plotter.pm	(revision 30250)
@@ -7,4 +7,6 @@
 
 use File::Temp;
+
+use czartool::Config;
 
 my @allStages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist");
@@ -18,6 +20,5 @@
     my $class = shift;
     my $self = {
-        _gpc1Db => shift,
-        _czarDb => shift,
+        _config => shift,
         _dateFormat => shift,
         _outputFormat => shift,
@@ -27,4 +28,5 @@
 
     bless $self, $class;
+    $self->init();
     return $self;
 }
@@ -38,14 +40,13 @@
     my $class = shift;
     my $self = {
-        _gpc1Db => shift,
-        _czarDb => shift,
+        _config => shift,
         _outputPath => shift,
         _save_temps => shift,
                                                     };
-
     $self->{_dateFormat} = "%Y%m%d-%H%M%S";
-    $self->{_outputFormat} = "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8"; # TODO path needs to be in config
-
-        bless $self, $class;
+    $self->{_outputFormat} = "png font \"".$self->{_config}->getGnuplotFont()."\" ".$self->{_config}->getGnuplotFontSize();
+
+    bless $self, $class;
+    $self->init();
     return $self;
 }
@@ -59,6 +60,5 @@
     my $class = shift;
     my $self = {
-        _gpc1Db => shift,
-        _czarDb => shift,
+        _config => shift,
         _save_temps => shift,
     };
@@ -69,8 +69,19 @@
 
     bless $self, $class;
+    $self->init();
     return $self;
 }
 
-
+###########################################################################
+#
+# Some initialisation code common to all constructors
+#
+###########################################################################
+sub init {
+    my ($self) = @_;
+
+    $self->{_gpc1Db} = $self->{_config}->getGpc1Instance();
+    $self->{_czarDb} = $self->{_config}->getCzarDbInstance();
+}
 
 ###########################################################################
