Index: branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj	(revision 6618)
+++ branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj	(revision 6647)
@@ -117,4 +117,10 @@
       <DependentUpon>InteractiveSymbolicRegressionSolutionSimplifierView.cs</DependentUpon>
     </Compile>
+    <Compile Include="SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicRegressionSolutionErrorCharacteristicsCurveView.Designer.cs">
+      <DependentUpon>SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs</DependentUpon>
+    </Compile>
     <Compile Include="SymbolicRegressionSolutionView.cs">
       <SubType>UserControl</SubType>
@@ -129,4 +135,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Algorithms.DataAnalysis\3.4\HeuristicLab.Algorithms.DataAnalysis-3.4.csproj">
+      <Project>{2E782078-FA81-4B70-B56F-74CE38DAC6C8}</Project>
+      <Name>HeuristicLab.Algorithms.DataAnalysis-3.4</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
@@ -208,4 +218,8 @@
       <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
       <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj">
+      <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project>
+      <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name>
     </ProjectReference>
   </ItemGroup>
Index: branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLabProblemsDataAnalysisSymbolicRegressionViewsPlugin.cs.frame
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLabProblemsDataAnalysisSymbolicRegressionViewsPlugin.cs.frame	(revision 6618)
+++ branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLabProblemsDataAnalysisSymbolicRegressionViewsPlugin.cs.frame	(revision 6647)
@@ -28,4 +28,6 @@
   [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views", "Provides views for symbolic regression problem classes.", "3.4.1.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.dll",PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
@@ -41,4 +43,5 @@
   [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic.Views", "3.4")]
   [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views", "3.4")]
+  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")]
   public class HeuristicLabProblemsDataAnalysisSymbolicRegressionViewsPlugin : PluginBase {
   }
Index: branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.Designer.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.Designer.cs	(revision 6647)
+++ branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.Designer.cs	(revision 6647)
@@ -0,0 +1,46 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
+  partial class SymbolicRegressionSolutionErrorCharacteristicsCurveView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
+      // 
+      // SymbolicRegressionSolutionErrorCharacteristicsCurveView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "SymbolicRegressionSolutionErrorCharacteristicsCurveView";
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+  }
+}
Index: branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs	(revision 6647)
+++ branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs	(revision 6647)
@@ -0,0 +1,102 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Views;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
+  [View("Error Characteristics Curve")]
+  [Content(typeof(ISymbolicRegressionSolution))]
+  public partial class SymbolicRegressionSolutionErrorCharacteristicsCurveView : RegressionSolutionErrorCharacteristicsCurveView {
+    private IRegressionSolution linearRegressionSolution;
+    public SymbolicRegressionSolutionErrorCharacteristicsCurveView() {
+      InitializeComponent();
+    }
+
+    public new ISymbolicRegressionSolution Content {
+      get { return (ISymbolicRegressionSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      if (Content != null)
+        linearRegressionSolution = CreateLinearRegressionSolution();
+      else
+        linearRegressionSolution = null;
+
+      base.OnContentChanged();
+    }
+
+    protected override void UpdateChart() {
+      base.UpdateChart();
+      if (Content == null || linearRegressionSolution == null) return;
+      AddRegressionSolution(linearRegressionSolution);
+    }
+
+    private IRegressionSolution CreateLinearRegressionSolution() {
+      if (Content == null) throw new InvalidOperationException();
+      double rmse, cvRmsError;
+      var problemData = (IRegressionProblemData)ProblemData.Clone();
+
+      //clear checked inputVariables
+      foreach (var inputVariable in problemData.InputVariables.CheckedItems) {
+        problemData.InputVariables.SetItemCheckedState(inputVariable.Value, false);
+      }
+
+      //check inputVariables used in the symbolic regression model
+      var usedVariables =
+        Content.Model.SymbolicExpressionTree.IterateNodesPostfix().OfType<VariableTreeNode>().Select(
+          node => node.VariableName).Distinct();
+      foreach (var variable in usedVariables) {
+        problemData.InputVariables.SetItemCheckedState(
+          problemData.InputVariables.Where(x => x.Value == variable).First(), true);
+      }
+
+      var solution = LinearRegression.CreateLinearRegressionSolution(problemData, out rmse, out cvRmsError);
+      solution.Name = "Linear Model";
+      return solution;
+    }
+
+    protected override void Content_ModelChanged(object sender, EventArgs e) {
+      linearRegressionSolution = CreateLinearRegressionSolution();
+      base.Content_ModelChanged(sender, e);
+    }
+
+    protected override void Content_ProblemDataChanged(object sender, EventArgs e) {
+      linearRegressionSolution = CreateLinearRegressionSolution();
+      base.Content_ProblemDataChanged(sender, e);
+    }
+
+    private void chart_MouseDown(object sender, MouseEventArgs e) {
+      if (e.Clicks < 2) return;
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType != ChartElementType.LegendItem) return;
+      if (result.Series.Name != linearRegressionSolution.Name) return;
+
+      MainFormManager.MainForm.ShowContent((IRegressionSolution)result.Series.Tag);
+    }
+  }
+}
