Index: trunk/tools/czartool/Plotter.pm
===================================================================
--- trunk/tools/czartool/Plotter.pm	(revision 29377)
+++ trunk/tools/czartool/Plotter.pm	(revision 29437)
@@ -130,5 +130,5 @@
 ###########################################################################
 sub createTimeSeries {
-    my ($self, $label, $selectedStage, $beginTime, $endTime, $isLog, $showCleanup) = @_;
+    my ($self, $label, $selectedStage, $beginTime, $endTime, $isLog, $showCleanup, $deriv) = @_;
 
     my $minX = 999999999;      
@@ -156,5 +156,6 @@
                     \$gnuplotFile,
                     $isLog,
-                    $showCleanup)) {
+                    $showCleanup,
+                    $deriv)) {
 
             $gnuplotFiles{$stage} = $gnuplotFile;
@@ -186,5 +187,6 @@
             $minX, 
             $timeDiff, 
-            $isLog);
+            $isLog,
+            $deriv);
 }                                                    
 
@@ -325,20 +327,22 @@
 ###########################################################################
 sub plotTimeSeries {
-    my ($self, $gnuplotFiles, $outputFile, $label, $fromTime, $toTime, $maxX, $minX, $timeDiff, $isLog) = @_;
+    my ($self, $gnuplotFiles, $outputFile, $label, $fromTime, $toTime, $maxX, $minX, $timeDiff, $isLog, $isDeriv) = @_;
 
     my $timeFormat = undef;
     my $divX = undef;
     my $yTitle = undef;
-    if ($isLog) {$yTitle = "Log( numExposures )";}
-    else {$yTitle = "numExposures";}
+    if ($isLog) {$yTitle = "Log( Exposures )";}
+    elsif ($isDeriv) {$yTitle = "dExposures/dTime";}
+    else {$yTitle = "Exposures";}
 
     $self->getTimeSpacing($timeDiff, \$divX, \$timeFormat);
 
     my $numOfPlots = keys %$gnuplotFiles;
-    my $title = undef;
 
     # sort out plot title
-    if ($numOfPlots == 1) {foreach my $stage (keys %$gnuplotFiles) {$title = "'".$stage."'";}}
-    else {$title = "'All stages'"}
+    my $title = "";
+    if ($isDeriv) {$title .= "First derivatives of "}
+    if ($numOfPlots == 1) {foreach my $stage (keys %$gnuplotFiles) {$title .= "'".$stage."'";}}
+    else {$title .= "'all stages'"}
 
     $title .= " for '$label', '$fromTime' to '$toTime'";
@@ -369,6 +373,6 @@
         if ($numOfPlots == 1) {
 
+            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,";
             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:4 title \"Processed\" with lines lt 2 lw 2,";
-            print GP "'" . $gnuplotFiles->{$stage} . "' using 1:2 title \"Pending\" with lines lt 4 lw 2,";
             print GP "'" . $gnuplotFiles->{$stage} . "' using 1:3 title \"Faults\" with lines lt 7 lw 2";
         }
