Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DataTableHelper.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DataTableHelper.cs	(revision 8498)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DataTableHelper.cs	(revision 8498)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
+  public class DataTableHelper {
+
+    private ResultCollection resultsCol;
+    private string chartName;
+    private string dataRowName;
+    private DataRow dtRow;
+
+
+    public void InitializeChart(ResultCollection results, string chartName, string dataRowName) {
+      if (!results.ContainsKey(chartName)) {
+        this.resultsCol = results;
+        this.chartName = chartName;
+        this.dataRowName = dataRowName;
+
+        DataTable dt = new DataTable(chartName);
+        dtRow = new DataRow(dataRowName);
+        dt.Rows.Add(dtRow);
+        results.Add(new Result(chartName, dt));
+      }
+    }
+
+    public void AddPoint(double point) {
+      dtRow.Values.Add(point);
+    }
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DuplicateSolutionsAnalyzer.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DuplicateSolutionsAnalyzer.cs	(revision 8496)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/DuplicateSolutionsAnalyzer.cs	(revision 8498)
@@ -56,5 +56,5 @@
     }
 
-    private DataRow dtRow;
+    private DataTableHelper chartingHelper;
     #endregion
 
@@ -68,4 +68,6 @@
       SimilarityCalculatorParameter.Value.SolutionVariableName = "TSPTour";
       SimilarityCalculatorParameter.Value.QualityVariableName = "TSPTourLength";
+
+      chartingHelper = new DataTableHelper();
     }
 
@@ -75,10 +77,5 @@
 
     public override IOperation Apply() {
-      if (!Results.ContainsKey("Duplicate Solutions")) {
-        DataTable dt = new DataTable("Duplicate Solutions");
-        dtRow = new DataRow("Duplicate Solutions per Generation");
-        dt.Rows.Add(dtRow);
-        Results.Add(new Result("Duplicate Solutions", dt));
-      }
+      chartingHelper.InitializeChart(Results, "Duplicate Solutions", "Duplicate Solutions per Generation");
 
       var similarities = SimilarityCalculatorParameter.Value.CalculateSolutionCrowdSimilarity(ExecutionContext.Scope);
@@ -92,6 +89,6 @@
         }
       }
-      dtRow.Values.Add(counter);
 
+      chartingHelper.AddPoint(counter);
       return base.Apply();
     }
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj	(revision 8496)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj	(revision 8498)
@@ -96,4 +96,6 @@
   <ItemGroup>
     <Compile Include="AlgorithmBehaviorHelpers.cs" />
+    <Compile Include="ScatterPlotHelper.cs" />
+    <Compile Include="DataTableHelper.cs" />
     <Compile Include="DuplicateSolutionsAnalyzer.cs" />
     <Compile Include="MutationPerformanceAnalyzer.cs" />
@@ -106,4 +108,5 @@
     <None Include="HeuristicLab.snk" />
     <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/MutationPerformanceAnalyzer.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/MutationPerformanceAnalyzer.cs	(revision 8496)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/MutationPerformanceAnalyzer.cs	(revision 8498)
@@ -74,7 +74,9 @@
     #endregion
 
-    ScatterPlot plot, diversityPlot;
-    DataRow dtRow;
-    int cnt = 0;
+
+    ScatterPlotHelper diversityPlotHelper, qualityPlotHelper;
+    DataTableHelper avgDataTableHelper;
+    int cnt = 0, lastGeneration = 0;
+    List<double> qualityPoints = new List<double>();
 
     [StorableConstructor]
@@ -97,4 +99,8 @@
       Parameters.Add(new LookupParameter<Permutation>("PermutationAfterMutation"));
       PermutationAfterMutationParameter.ActualName = "TSPTour";
+
+      diversityPlotHelper = new ScatterPlotHelper();
+      qualityPlotHelper = new ScatterPlotHelper();
+      avgDataTableHelper = new DataTableHelper();
     }
 
@@ -105,4 +111,5 @@
     public override IOperation Apply() {
       Point2D<double> curPoint, divPoint;
+
       var qualityCX = QualityAfterCrossoverParameter.ActualValue.Value;
       var qualityM = QualityAfterMutationParameter.ActualValue.Value;
@@ -110,72 +117,29 @@
       var permutationAfter = PermutationAfterMutationParameter.ActualValue;
 
+      qualityPlotHelper.InitializePlot(Results, "Mutation Quality", "Solution Index", "Absolut Quality Difference");
+      diversityPlotHelper.InitializePlot(Results, "Mutation Diversity", "Solution Index", "Diversity");
+      avgDataTableHelper.InitializeChart(Results, "Average Mutation Performance", "Average Mutation Performance per Generation");
+
       divPoint = new Point2D<double>(cnt, TSPSimilarityCalculator.CalculateSimilarity(permutationBefore, permutationAfter));
       curPoint = new Point2D<double>(cnt++, qualityCX - qualityM);
+      qualityPoints.Add(curPoint.Y);
 
       string curGenStr = GenerationsParameter.ActualValue.Value.ToString();
-      ScatterPlotDataRow row, divRow;
 
-      if (!Results.ContainsKey("Mutation Scatter Plot")) {
-        InitializePlot();
-        InitializeDiversityPlot();
-        Results.Add(new Result("Mutation Scatter Plot", plot));
-        Results.Add(new Result("Mutation Scatter Plot History", new ScatterPlotHistory()));
-        Results.Add(new Result("Mutation Diversity Plot", diversityPlot));
-        Results.Add(new Result("Mutation Diversity Plot History", new ScatterPlotHistory()));
-        cnt = 0;
+      qualityPlotHelper.AddPoint(curGenStr, curPoint);
+      diversityPlotHelper.AddPoint(curGenStr, divPoint);
 
-        DataTable dt = new DataTable("Average Mutation Performance");
-        dtRow = new DataRow("Average Mutation Performance per Generation");
-        dt.Rows.Add(dtRow);
-        Results.Add(new Result("Average Mutation Performance", dt));
-      }
-
-      if (!plot.Rows.ContainsKey(curGenStr)) {
-        if (GenerationsParameter.ActualValue.Value != 0) {
-          if (plot.Rows.ContainsKey((GenerationsParameter.ActualValue.Value - 1).ToString())) {
-            double avg = plot.Rows[(GenerationsParameter.ActualValue.Value - 1).ToString()].Points.Average(x => x.Y);
-            dtRow.Values.Add(avg);
-            ((ScatterPlotHistory)Results["Mutation Scatter Plot History"].Value).Add(plot);
-            ((ScatterPlotHistory)Results["Mutation Diversity Plot History"].Value).Add(diversityPlot);
-          }
-          InitializePlot();
-          InitializeDiversityPlot();
-          Results["Mutation Scatter Plot"].Value = plot;
-          Results["Mutation Diversity Plot"].Value = diversityPlot;
+      if (GenerationsParameter.ActualValue.Value != 0) {
+        if (GenerationsParameter.ActualValue.Value > lastGeneration) {
+          double avg = qualityPoints.Average();
+          avgDataTableHelper.AddPoint(avg);
           cnt = 0;
+          lastGeneration = GenerationsParameter.ActualValue.Value;
+          qualityPoints.Clear();
         }
-
-        var points = new List<Point2D<double>>();
-        points.Add(curPoint);
-        row = new ScatterPlotDataRow(curGenStr, null, points);
-        row.VisualProperties.PointStyle = ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle.Circle;
-        row.VisualProperties.PointSize = 5;
-        plot.Rows.Add(row);
-
-        points = new List<Point2D<double>>();
-        points.Add(divPoint);
-        divRow = new ScatterPlotDataRow(curGenStr, null, points);
-        divRow.VisualProperties.PointStyle = ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle.Circle;
-        divRow.VisualProperties.PointSize = 5;
-        diversityPlot.Rows.Add(divRow);
-      } else {
-        plot.Rows[curGenStr].Points.Add(curPoint);
-        diversityPlot.Rows[curGenStr].Points.Add(divPoint);
       }
 
       return base.Apply();
     }
-
-    private void InitializePlot() {
-      plot = new ScatterPlot("Mutation Performance", null);
-      plot.VisualProperties.XAxisTitle = "Solution Index";
-      plot.VisualProperties.YAxisTitle = "Absolut Quality Difference";
-    }
-
-    private void InitializeDiversityPlot() {
-      diversityPlot = new ScatterPlot("Mutation Diversity", null);
-      diversityPlot.VisualProperties.XAxisTitle = "Solution Index";
-      diversityPlot.VisualProperties.YAxisTitle = "Diversity";
-    }
   }
 }
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/Properties/AssemblyInfo.cs.frame	(revision 8496)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/Properties/AssemblyInfo.cs.frame	(revision 8498)
@@ -27,6 +27,6 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("HeuristicLab.Analysis.AlgorithmBehavior")]
-[assembly: AssemblyDescription("Provides operators and related classes for tracking the evolution within a GA.")]
+[assembly: AssemblyTitle("HeuristicLab.Analysis.AlgorithmBehavior.Analyzers")]
+[assembly: AssemblyDescription("Provides analyzers for tracking the behavior of GAs.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
@@ -54,3 +54,3 @@
 // by using the '*' as shown below:
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.6.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ScatterPlotHelper.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ScatterPlotHelper.cs	(revision 8498)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ScatterPlotHelper.cs	(revision 8498)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
+  public class ScatterPlotHelper {
+
+    private ResultCollection resultsCol;
+    private string chartName;
+    private string xAxisTitle;
+    private string yAxisTitle;
+
+    private ScatterPlot plot;
+    public ScatterPlot Plot {
+      get { return plot; }
+      private set { plot = value; }
+    }
+
+    public void InitializePlot(ResultCollection results, string chartName, string xAxisTitle, string yAxisTitle) {
+      if (!results.ContainsKey(chartName)) {
+        this.chartName = chartName;
+        this.resultsCol = results;
+        this.xAxisTitle = xAxisTitle;
+        this.yAxisTitle = yAxisTitle;
+
+        Initialize();
+
+        results.Add(new Result(chartName, Plot));
+        results.Add(new Result(chartName + " History", new ScatterPlotHistory()));
+      }
+    }
+
+    public void AddPoint(string rowName, Point2D<double> point) {
+      if (!Plot.Rows.ContainsKey(rowName)) {
+        ((ScatterPlotHistory)resultsCol[chartName + " History"].Value).Add(Plot);
+        Initialize();
+        resultsCol[chartName].Value = Plot;
+
+        var points = new List<Point2D<double>>();
+        points.Add(point);
+        ScatterPlotDataRow row = new ScatterPlotDataRow(rowName, null, points);
+        row.VisualProperties.PointStyle = ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle.Circle;
+        row.VisualProperties.PointSize = 5;
+        Plot.Rows.Add(row);
+      } else {
+        Plot.Rows[rowName].Points.Add(point);
+      }
+    }
+
+    private void Initialize() {
+      Plot = new ScatterPlot(chartName, null);
+      Plot.VisualProperties.XAxisTitle = xAxisTitle;
+      Plot.VisualProperties.YAxisTitle = yAxisTitle;
+    }
+  }
+}
