Index: /trunk/sources/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj	(revision 14492)
+++ /trunk/sources/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj	(revision 14493)
@@ -105,4 +105,8 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core">
Index: /trunk/sources/HeuristicLab.Analysis.Views/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Analysis.Views/3.3/Plugin.cs.frame	(revision 14492)
+++ /trunk/sources/HeuristicLab.Analysis.Views/3.3/Plugin.cs.frame	(revision 14493)
@@ -28,4 +28,5 @@
   [Plugin("HeuristicLab.Analysis.Views", "3.3.14.$WCREV$")]
   [PluginFile("HeuristicLab.Analysis.Views-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
   [PluginDependency("HeuristicLab.Analysis", "3.3")]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
Index: /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs	(revision 14492)
+++ /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs	(revision 14493)
@@ -24,4 +24,5 @@
 using System.Drawing;
 using System.Linq;
+using System.Text;
 using System.Windows.Forms;
 using System.Windows.Forms.DataVisualization.Charting;
@@ -33,4 +34,5 @@
     protected List<Series> invisibleSeries;
     protected Dictionary<IObservableList<Point2D<double>>, ScatterPlotDataRow> pointsRowsTable;
+    protected Dictionary<Series, Series> seriesToRegressionSeriesTable;
     private double xMin, xMax, yMin, yMax;
 
@@ -51,4 +53,5 @@
       InitializeComponent();
       pointsRowsTable = new Dictionary<IObservableList<Point2D<double>>, ScatterPlotDataRow>();
+      seriesToRegressionSeriesTable = new Dictionary<Series, Series>();
       invisibleSeries = new List<Series>();
       chart.CustomizeAllChartAreas();
@@ -126,10 +129,22 @@
       foreach (var row in rows) {
         RegisterScatterPlotDataRowEvents(row);
-        Series series = new Series(row.Name);
+        Series series = new Series(row.Name) {
+          Tag = row
+        };
         if (row.VisualProperties.DisplayName.Trim() != String.Empty) series.LegendText = row.VisualProperties.DisplayName;
         else series.LegendText = row.Name;
-        ConfigureSeries(series, row);
+        var regressionSeries = new Series(row.Name + "_Regression") {
+          Tag = row,
+          ChartType = SeriesChartType.Line,
+          BorderDashStyle = ChartDashStyle.Dot,
+          IsVisibleInLegend = false,
+          Color = Color.Transparent // to avoid auto color assignment via color palette 
+        };
+        seriesToRegressionSeriesTable.Add(series, regressionSeries);
+        ConfigureSeries(series, regressionSeries, row);
         FillSeriesWithRowValues(series, row);
         chart.Series.Add(series);
+        chart.Series.Add(regressionSeries);
+        FillRegressionSeries(regressionSeries, row);
       }
       ConfigureChartArea(chart.ChartAreas[0]);
@@ -137,4 +152,5 @@
       RecalculateAxesScale(chart.ChartAreas[0]);
       UpdateYCursorInterval();
+      UpdateRegressionSeriesColors();
     }
 
@@ -146,4 +162,6 @@
         if (invisibleSeries.Contains(series))
           invisibleSeries.Remove(series);
+        chart.Series.Remove(seriesToRegressionSeriesTable[series]);
+        seriesToRegressionSeriesTable.Remove(series);
       }
       RecalculateMinMaxPointValues();
@@ -151,5 +169,5 @@
     }
 
-    private void ConfigureSeries(Series series, ScatterPlotDataRow row) {
+    private void ConfigureSeries(Series series, Series regressionSeries, ScatterPlotDataRow row) {
       series.BorderWidth = 1;
       series.BorderDashStyle = ChartDashStyle.Solid;
@@ -179,4 +197,11 @@
         xAxisTitle + " = " + "#VALX," + Environment.NewLine +
         yAxisTitle + " = " + "#VAL";
+
+      regressionSeries.BorderWidth = Math.Max(1, row.VisualProperties.PointSize / 2);
+      regressionSeries.IsVisibleInLegend = row.VisualProperties.IsRegressionVisibleInLegend &&
+        row.VisualProperties.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None;
+      regressionSeries.LegendText = string.IsNullOrEmpty(row.VisualProperties.RegressionDisplayName)
+        ? string.Format("{0}({1})", row.VisualProperties.RegressionType, row.Name)
+        : row.VisualProperties.RegressionDisplayName;
     }
 
@@ -250,4 +275,13 @@
     }
 
+    protected void UpdateRegressionSeriesColors() {
+      chart.ApplyPaletteColors();
+      foreach (var row in Content.Rows) {
+        var series = chart.Series[row.Name];
+        var regressionSeries = seriesToRegressionSeriesTable[series];
+        regressionSeries.Color = series.Color;
+      }
+    }
+
     #region Event Handlers
     #region Content Event Handlers
@@ -300,9 +334,13 @@
         ScatterPlotDataRow row = (ScatterPlotDataRow)sender;
         Series series = chart.Series[row.Name];
+        Series regressionSeries = seriesToRegressionSeriesTable[series];
         series.Points.Clear();
-        ConfigureSeries(series, row);
+        regressionSeries.Points.Clear();
+        ConfigureSeries(series, regressionSeries, row);
         FillSeriesWithRowValues(series, row);
+        FillRegressionSeries(regressionSeries, row);
         RecalculateMinMaxPointValues();
         RecalculateAxesScale(chart.ChartAreas[0]);
+        UpdateRegressionSeriesColors();
       }
     }
@@ -325,7 +363,10 @@
         if (row != null) {
           Series rowSeries = chart.Series[row.Name];
+          Series regressionSeries = seriesToRegressionSeriesTable[rowSeries];
           if (!invisibleSeries.Contains(rowSeries)) {
             rowSeries.Points.Clear();
+            regressionSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
+            FillRegressionSeries(regressionSeries, row);
             RecalculateMinMaxPointValues();
             RecalculateAxesScale(chart.ChartAreas[0]);
@@ -343,7 +384,10 @@
         if (row != null) {
           Series rowSeries = chart.Series[row.Name];
+          Series regressionSeries = seriesToRegressionSeriesTable[rowSeries];
           if (!invisibleSeries.Contains(rowSeries)) {
             rowSeries.Points.Clear();
+            regressionSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
+            FillRegressionSeries(regressionSeries, row);
             RecalculateMinMaxPointValues();
             RecalculateAxesScale(chart.ChartAreas[0]);
@@ -361,7 +405,10 @@
         if (row != null) {
           Series rowSeries = chart.Series[row.Name];
+          Series regressionSeries = seriesToRegressionSeriesTable[rowSeries];
           if (!invisibleSeries.Contains(rowSeries)) {
             rowSeries.Points.Clear();
+            regressionSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
+            FillRegressionSeries(regressionSeries, row);
             RecalculateMinMaxPointValues();
             RecalculateAxesScale(chart.ChartAreas[0]);
@@ -379,7 +426,10 @@
         if (row != null) {
           Series rowSeries = chart.Series[row.Name];
+          Series regressionSeries = seriesToRegressionSeriesTable[rowSeries];
           if (!invisibleSeries.Contains(rowSeries)) {
             rowSeries.Points.Clear();
+            regressionSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
+            FillRegressionSeries(regressionSeries, row);
             RecalculateMinMaxPointValues();
             RecalculateAxesScale(chart.ChartAreas[0]);
@@ -430,9 +480,9 @@
         invisibleSeries.Remove(series);
         if (Content != null) {
-
-          var row = (from r in Content.Rows
-                     where r.Name == series.Name
-                     select r).Single();
-          FillSeriesWithRowValues(series, row);
+          var row = (ScatterPlotDataRow)series.Tag;
+          if (seriesToRegressionSeriesTable.ContainsKey(series))
+            FillSeriesWithRowValues(series, row);
+          else
+            FillRegressionSeries(series, row);
           RecalculateMinMaxPointValues();
           this.chart.Legends[series.Legend].ForeColor = Color.Black;
@@ -469,4 +519,31 @@
         series.Points.Add(point);
       }
+      double correlation = Correlation(row.Points);
+      series.LegendToolTip = string.Format("Correlation (R²) = {0:G4}", correlation * correlation);
+    }
+
+    private void FillRegressionSeries(Series regressionSeries, ScatterPlotDataRow row) {
+      if (row.VisualProperties.RegressionType == ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None
+        || invisibleSeries.Contains(regressionSeries))
+        return;
+
+      double[] coefficients;
+      if (!Fitting(row, out coefficients))
+        return;
+
+      // Fill regrssion series
+      var validPoints = row.Points.Where(p => !IsInvalidValue(p.X));
+      double min = validPoints.Min(p => p.X), max = validPoints.Max(p => p.X);
+      double range = max - min, delta = range / row.Points.Count;
+      for (double x = min; x < max; x += delta) {
+        regressionSeries.Points.AddXY(x, Estimate(x, row, coefficients));
+      }
+
+      // Correlation
+      var data = row.Points.Select(p => new Point2D<double>(p.Y, Estimate(p.X, row, coefficients)));
+      double correlation = Correlation(data.ToList());
+      regressionSeries.LegendToolTip = GetStringFormula(row, coefficients) + Environment.NewLine +
+                                       string.Format("Correlation (R²) = {0:G4}", correlation * correlation);
+      regressionSeries.ToolTip = GetStringFormula(row, coefficients);
     }
 
@@ -501,4 +578,171 @@
     }
     #endregion
+
+    #region Correlation and Fitting Helper
+    protected static double Correlation(IList<Point2D<double>> values) {
+      // sums of x, y, x squared etc.
+      double sx = 0.0;
+      double sy = 0.0;
+      double sxx = 0.0;
+      double syy = 0.0;
+      double sxy = 0.0;
+
+      int n = 0;
+      for (int i = 0; i < values.Count; i++) {
+        double x = values[i].X;
+        double y = values[i].Y;
+        if (IsInvalidValue(x) || IsInvalidValue(y))
+          continue;
+
+        sx += x;
+        sy += y;
+        sxx += x * x;
+        syy += y * y;
+        sxy += x * y;
+        n++;
+      }
+
+      // covariation
+      double cov = sxy / n - sx * sy / n / n;
+      // standard error of x
+      double sigmaX = Math.Sqrt(sxx / n -  sx * sx / n / n);
+      // standard error of y
+      double sigmaY = Math.Sqrt(syy / n -  sy * sy / n / n);
+
+      // correlation
+      return cov / sigmaX / sigmaY;
+    }
+
+    protected static bool Fitting(ScatterPlotDataRow row, out double[] coefficients) {
+      var xs = row.Points.Select(p => p.X).ToList();
+      var ys = row.Points.Select(p => p.Y).ToList();
+
+      // Input transformations
+      double[,] matrix;
+      int nRows;
+      switch (row.VisualProperties.RegressionType) {
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Linear:
+          matrix = CreateMatrix(out nRows, ys, xs);
+          break;
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial:
+          var xss = Enumerable.Range(1, row.VisualProperties.PolynomialRegressionOrder)
+            .Select(o => xs.Select(x => Math.Pow(x, o)).ToList())
+            .Reverse(); // higher order first
+          matrix = CreateMatrix(out nRows, ys, xss.ToArray());
+          break;
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Exponential:
+          matrix = CreateMatrix(out nRows, ys.Select(y => Math.Log(y)).ToList(), xs);
+          break;
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Power:
+          matrix = CreateMatrix(out nRows, ys.Select(y => Math.Log(y)).ToList(), xs.Select(x => Math.Log(x)).ToList());
+          break;
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Logarithmic:
+          matrix = CreateMatrix(out nRows, ys, xs.Select(x => Math.Log(x)).ToList());
+          break;
+        default:
+          throw new ArgumentException("Unknown RegressionType: " + row.VisualProperties.RegressionType);
+      }
+
+      // Linear fitting
+      bool success = LinearFitting(matrix, nRows, out coefficients);
+      if (!success) return success;
+
+      // Output transformation
+      switch (row.VisualProperties.RegressionType) {
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Exponential:
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Power:
+          coefficients[1] = Math.Exp(coefficients[1]);
+          break;
+      }
+
+      return true;
+    }
+    protected static double[,] CreateMatrix(out int nRows, IList<double> ys, params IList<double>[] xss) {
+      var matrix = new double[ys.Count, xss.Length + 1];
+      int rowIdx = 0;
+      for (int i = 0; i < ys.Count; i++) {
+        if (IsInvalidValue(ys[i]) || xss.Any(xs => IsInvalidValue(xs[i])))
+          continue;
+        for (int j = 0; j < xss.Length; j++) {
+          matrix[rowIdx, j] = xss[j][i];
+        }
+        matrix[rowIdx, xss.Length] = ys[i];
+        rowIdx++;
+      }
+      nRows = rowIdx;
+      return matrix;
+    }
+
+    protected static bool LinearFitting(double[,] xsy, int nRows, out double[] coefficients) {
+      int nFeatures = xsy.GetLength(1) - 1;
+
+      alglib.linearmodel lm;
+      alglib.lrreport ar;
+      int retVal;
+      alglib.lrbuild(xsy, nRows, nFeatures, out retVal, out lm, out ar);
+      if (retVal != 1) {
+        coefficients = new double[0];
+        return false;
+      }
+
+      alglib.lrunpack(lm, out coefficients, out nFeatures);
+      return true;
+    }
+
+    protected static double Estimate(double x, ScatterPlotDataRow row, double[] coefficients) {
+      switch (row.VisualProperties.RegressionType) {
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Linear:
+          return coefficients[0] * x + coefficients[1];
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial:
+          return coefficients
+            .Reverse() // to match index and order
+            .Select((c, o) => c * Math.Pow(x, o))
+            .Sum();
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Exponential:
+          return coefficients[1] * Math.Exp(coefficients[0] * x);
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Power:
+          return coefficients[1] * Math.Pow(x, coefficients[0]);
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Logarithmic:
+          return coefficients[0] * Math.Log(x) + coefficients[1];
+        default:
+          throw new ArgumentException("Unknown RegressionType: " + row.VisualProperties.RegressionType);
+      }
+    }
+
+    protected static string GetStringFormula(ScatterPlotDataRow row, double[] coefficients) {
+      switch (row.VisualProperties.RegressionType) {
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Linear:
+          return string.Format("{0:G4} x {1} {2:G4}", coefficients[0], Sign(coefficients[1]), Math.Abs(coefficients[1]));
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial:
+          var sb = new StringBuilder();
+          sb.AppendFormat("{0:G4}{1}", coefficients[0], PolyFactor(coefficients.Length - 1));
+          foreach (var x in coefficients
+            .Reverse() // match index and order
+            .Select((c, o) => new { c, o })
+            .Reverse() // higher order first
+            .Skip(1)) // highest order poly already added
+            sb.AppendFormat(" {0} {1:G4}{2}", Sign(x.c), Math.Abs(x.c), PolyFactor(x.o));
+          return sb.ToString();
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Exponential:
+          return string.Format("{0:G4} e^({1:G4} x)", coefficients[1], coefficients[0]);
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Power:
+          return string.Format("{0:G4} x^({1:G4})", coefficients[1], coefficients[0]);
+        case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Logarithmic:
+          return string.Format("{0:G4} ln(x) {1} {2:G4}", coefficients[0], Sign(coefficients[1]), Math.Abs(coefficients[1]));
+        default:
+          throw new ArgumentException("Unknown RegressionType: " + row.VisualProperties.RegressionType);
+      }
+    }
+    private static string Sign(double value) {
+      return value >= 0 ? "+" : "-";
+    }
+    private static string PolyFactor(int order) {
+      if (order == 0) return "";
+      if (order == 1) return " x";
+      if (order == 2) return " x²";
+      if (order == 3) return " x³";
+      return " x^" + order;
+    }
+    #endregion
   }
 }
Index: /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.Designer.cs	(revision 14492)
+++ /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.Designer.cs	(revision 14493)
@@ -45,4 +45,5 @@
     /// </summary>
     private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
       this.pointStyleComboBox = new System.Windows.Forms.ComboBox();
       this.colorDialog = new System.Windows.Forms.ColorDialog();
@@ -56,5 +57,15 @@
       this.label9 = new System.Windows.Forms.Label();
       this.label7 = new System.Windows.Forms.Label();
+      this.label4 = new System.Windows.Forms.Label();
+      this.regressionTypeComboBox = new System.Windows.Forms.ComboBox();
+      this.regressionGroupBox = new System.Windows.Forms.GroupBox();
+      this.isRegressionVisibleInLegendCheckBox = new System.Windows.Forms.CheckBox();
+      this.polynomialRegressionOrderNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.orderLabel = new System.Windows.Forms.Label();
+      this.regressionLegendTextBox = new System.Windows.Forms.TextBox();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
       ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).BeginInit();
+      this.regressionGroupBox.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit();
       this.SuspendLayout();
       // 
@@ -171,7 +182,104 @@
       this.label7.Text = "&Visible in Legend:";
       // 
+      // label4
+      // 
+      this.label4.AutoSize = true;
+      this.label4.Location = new System.Drawing.Point(6, 22);
+      this.label4.Name = "label4";
+      this.label4.Size = new System.Drawing.Size(34, 13);
+      this.label4.TabIndex = 7;
+      this.label4.Text = "Type:";
+      // 
+      // regressionTypeComboBox
+      // 
+      this.regressionTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.regressionTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.regressionTypeComboBox.FormattingEnabled = true;
+      this.regressionTypeComboBox.Location = new System.Drawing.Point(93, 19);
+      this.regressionTypeComboBox.Name = "regressionTypeComboBox";
+      this.regressionTypeComboBox.Size = new System.Drawing.Size(147, 21);
+      this.regressionTypeComboBox.TabIndex = 8;
+      this.regressionTypeComboBox.SelectedValueChanged += new System.EventHandler(this.regressionTypeComboBox_SelectedValueChanged);
+      // 
+      // regressionGroupBox
+      // 
+      this.regressionGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.regressionGroupBox.Controls.Add(this.isRegressionVisibleInLegendCheckBox);
+      this.regressionGroupBox.Controls.Add(this.regressionTypeComboBox);
+      this.regressionGroupBox.Controls.Add(this.polynomialRegressionOrderNumericUpDown);
+      this.regressionGroupBox.Controls.Add(this.orderLabel);
+      this.regressionGroupBox.Controls.Add(this.regressionLegendTextBox);
+      this.regressionGroupBox.Controls.Add(this.label4);
+      this.regressionGroupBox.Location = new System.Drawing.Point(3, 136);
+      this.regressionGroupBox.Name = "regressionGroupBox";
+      this.regressionGroupBox.Size = new System.Drawing.Size(336, 74);
+      this.regressionGroupBox.TabIndex = 9;
+      this.regressionGroupBox.TabStop = false;
+      this.regressionGroupBox.Text = "&Regression";
+      // 
+      // isRegressionVisibleInLegendCheckBox
+      // 
+      this.isRegressionVisibleInLegendCheckBox.AutoSize = true;
+      this.isRegressionVisibleInLegendCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.isRegressionVisibleInLegendCheckBox.Location = new System.Drawing.Point(6, 48);
+      this.isRegressionVisibleInLegendCheckBox.Name = "isRegressionVisibleInLegendCheckBox";
+      this.isRegressionVisibleInLegendCheckBox.Size = new System.Drawing.Size(68, 17);
+      this.isRegressionVisibleInLegendCheckBox.TabIndex = 13;
+      this.isRegressionVisibleInLegendCheckBox.Text = "Legend: ";
+      this.isRegressionVisibleInLegendCheckBox.UseVisualStyleBackColor = true;
+      this.isRegressionVisibleInLegendCheckBox.CheckedChanged += new System.EventHandler(this.isRegressionVisibleInLegendCheckBox_CheckedChanged);
+      // 
+      // polynomialRegressionOrderNumericUpDown
+      // 
+      this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.polynomialRegressionOrderNumericUpDown.Location = new System.Drawing.Point(285, 20);
+      this.polynomialRegressionOrderNumericUpDown.Margin = new System.Windows.Forms.Padding(9, 3, 3, 3);
+      this.polynomialRegressionOrderNumericUpDown.Maximum = new decimal(new int[] {
+            6,
+            0,
+            0,
+            0});
+      this.polynomialRegressionOrderNumericUpDown.Minimum = new decimal(new int[] {
+            2,
+            0,
+            0,
+            0});
+      this.polynomialRegressionOrderNumericUpDown.Name = "polynomialRegressionOrderNumericUpDown";
+      this.polynomialRegressionOrderNumericUpDown.Size = new System.Drawing.Size(45, 20);
+      this.polynomialRegressionOrderNumericUpDown.TabIndex = 11;
+      this.toolTip.SetToolTip(this.polynomialRegressionOrderNumericUpDown, "Order only available for Polynomial");
+      this.polynomialRegressionOrderNumericUpDown.Value = new decimal(new int[] {
+            2,
+            0,
+            0,
+            0});
+      this.polynomialRegressionOrderNumericUpDown.ValueChanged += new System.EventHandler(this.polynomialRegressionOrderNumericUpDown_ValueChanged);
+      // 
+      // orderLabel
+      // 
+      this.orderLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.orderLabel.AutoSize = true;
+      this.orderLabel.Location = new System.Drawing.Point(246, 22);
+      this.orderLabel.Name = "orderLabel";
+      this.orderLabel.Size = new System.Drawing.Size(36, 13);
+      this.orderLabel.TabIndex = 12;
+      this.orderLabel.Text = "Order:";
+      // 
+      // regressionLegendTextBox
+      // 
+      this.regressionLegendTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.regressionLegendTextBox.Location = new System.Drawing.Point(93, 46);
+      this.regressionLegendTextBox.Name = "regressionLegendTextBox";
+      this.regressionLegendTextBox.Size = new System.Drawing.Size(237, 20);
+      this.regressionLegendTextBox.TabIndex = 10;
+      this.regressionLegendTextBox.Validated += new System.EventHandler(this.regressionLegendTextBox_Validated);
+      // 
       // ScatterPlotDataRowVisualPropertiesControl
       // 
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.regressionGroupBox);
       this.Controls.Add(this.pointSizeNumericUpDown);
       this.Controls.Add(this.isVisibleInLegendCheckBox);
@@ -185,6 +293,9 @@
       this.Controls.Add(this.colorButton);
       this.Name = "ScatterPlotDataRowVisualPropertiesControl";
-      this.Size = new System.Drawing.Size(342, 135);
+      this.Size = new System.Drawing.Size(342, 215);
       ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).EndInit();
+      this.regressionGroupBox.ResumeLayout(false);
+      this.regressionGroupBox.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).EndInit();
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -205,4 +316,12 @@
     private System.Windows.Forms.Label label9;
     private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.Label label4;
+    private System.Windows.Forms.ComboBox regressionTypeComboBox;
+    private System.Windows.Forms.GroupBox regressionGroupBox;
+    private System.Windows.Forms.TextBox regressionLegendTextBox;
+    private System.Windows.Forms.NumericUpDown polynomialRegressionOrderNumericUpDown;
+    private System.Windows.Forms.Label orderLabel;
+    private System.Windows.Forms.ToolTip toolTip;
+    private System.Windows.Forms.CheckBox isRegressionVisibleInLegendCheckBox;
   }
 }
Index: /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs	(revision 14492)
+++ /trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs	(revision 14493)
@@ -44,4 +44,5 @@
       InitializeComponent();
       pointStyleComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle));
+      regressionTypeComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType));
       SetEnabledStateOfControls();
     }
@@ -57,4 +58,8 @@
           pointSizeNumericUpDown.Value = 1;
           displayNameTextBox.Text = String.Empty;
+          regressionTypeComboBox.SelectedIndex = -1;
+          polynomialRegressionOrderNumericUpDown.Value = 2;
+          isRegressionVisibleInLegendCheckBox.Checked = false;
+          regressionLegendTextBox.Text = string.Empty;
         } else {
           displayNameTextBox.Text = Content.DisplayName;
@@ -69,4 +74,8 @@
           pointSizeNumericUpDown.Value = Content.PointSize;
           isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend;
+          regressionTypeComboBox.SelectedItem = Content.RegressionType;
+          polynomialRegressionOrderNumericUpDown.Value = Content.PolynomialRegressionOrder;
+          isRegressionVisibleInLegendCheckBox.Checked = Content.IsRegressionVisibleInLegend;
+          regressionLegendTextBox.Text = content.RegressionDisplayName;
         }
       }
@@ -82,4 +91,9 @@
       pointSizeNumericUpDown.Enabled = Content != null;
       displayNameTextBox.Enabled = Content != null;
+      regressionTypeComboBox.Enabled = Content != null;
+      polynomialRegressionOrderNumericUpDown.Enabled = Content != null && Content.RegressionType == ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial;
+      orderLabel.Enabled = polynomialRegressionOrderNumericUpDown.Enabled;
+      isRegressionVisibleInLegendCheckBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None;
+      regressionLegendTextBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None;
     }
 
@@ -87,5 +101,5 @@
     private void pointStyleComboBox_SelectedValueChanged(object sender, EventArgs e) {
       if (!SuppressEvents && Content != null) {
-        ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;
+        var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;
         Content.PointStyle = selected;
       }
@@ -121,4 +135,30 @@
       }
     }
+
+    private void regressionTypeComboBox_SelectedValueChanged(object sender, EventArgs e) {
+      if (!SuppressEvents && Content != null) {
+        var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)regressionTypeComboBox.SelectedValue;
+        Content.RegressionType = selected;
+        SetEnabledStateOfControls();
+      }
+    }
+
+    private void polynomialRegressionOrderNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      if (!SuppressEvents && Content != null) {
+        Content.PolynomialRegressionOrder = (int)polynomialRegressionOrderNumericUpDown.Value;
+      }
+    }
+
+    private void isRegressionVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) {
+      if (!SuppressEvents && Content != null) {
+        Content.IsRegressionVisibleInLegend = isRegressionVisibleInLegendCheckBox.Checked;
+      }
+    }
+
+    private void regressionLegendTextBox_Validated(object sender, EventArgs e) {
+      if (!SuppressEvents && Content != null) {
+        Content.RegressionDisplayName = regressionLegendTextBox.Text;
+      }
+    }
     #endregion
   }
Index: /trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/ScatterPlotDataRowVisualProperties.cs
===================================================================
--- /trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/ScatterPlotDataRowVisualProperties.cs	(revision 14492)
+++ /trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/ScatterPlotDataRowVisualProperties.cs	(revision 14493)
@@ -45,4 +45,14 @@
     }
     #endregion
+    #region
+    public enum ScatterPlotDataRowRegressionType {
+      None,
+      Linear,
+      Polynomial,
+      Exponential,
+      Logarithmic,
+      Power
+    }
+    #endregion
 
     private Color color;
@@ -101,4 +111,49 @@
       }
     }
+    private ScatterPlotDataRowRegressionType regressionType;
+    public ScatterPlotDataRowRegressionType RegressionType {
+      get { return regressionType; }
+      set {
+        if (regressionType != value) {
+          regressionType = value;
+          OnPropertyChanged("RegressionType");
+        }
+      }
+    }
+    private int polynomialRegressionOrder;
+    public int PolynomialRegressionOrder {
+      get { return polynomialRegressionOrder; }
+      set {
+        if (polynomialRegressionOrder != value) {
+          polynomialRegressionOrder = value;
+          OnPropertyChanged("PolynomialRegressionOrder");
+        }
+      }
+    }
+    private bool isRegressionVisibleInLegend;
+    public bool IsRegressionVisibleInLegend {
+      get { return isRegressionVisibleInLegend; }
+      set {
+        if (isRegressionVisibleInLegend != value) {
+          isRegressionVisibleInLegend = value;
+          OnPropertyChanged("IsRegressionVisibleInLegend");
+        }
+      }
+    }
+    private string regressionDisplayName;
+    public string RegressionDisplayName {
+      get { return regressionDisplayName ?? string.Empty; }
+      set {
+        if (regressionDisplayName != value) {
+          if (value == null && regressionDisplayName != string.Empty) {
+            regressionDisplayName = string.Empty;
+            OnPropertyChanged("RegressionDisplayName");
+          } else if (value != null) {
+            regressionDisplayName = value;
+            OnPropertyChanged("RegressionDisplayName");
+          }
+        }
+      }
+    }
 
     #region Persistence Properties
@@ -127,4 +182,24 @@
       get { return displayName; }
       set { displayName = value; }
+    }
+    [Storable(Name = "RegressionType")]
+    private ScatterPlotDataRowRegressionType StorableRegressionType {
+      get { return regressionType; }
+      set { regressionType = value; }
+    }
+    [Storable(Name = "PolynomialRegressionOrder", DefaultValue = 2)]
+    private int StorablePolynomialRegressionOrder {
+      get { return polynomialRegressionOrder; }
+      set { polynomialRegressionOrder = value; }
+    }
+    [Storable(Name = "IsRegressionVisibleInLegend", DefaultValue = true)]
+    private bool StorableIsRegressionVisibleInLegend {
+      get { return isRegressionVisibleInLegend; }
+      set { isRegressionVisibleInLegend = value; }
+    }
+    [Storable(Name = "RegressionDisplayName")]
+    private string StorableRegressionDisplayName {
+      get { return regressionDisplayName; }
+      set { regressionDisplayName = value; }
     }
     #endregion
@@ -139,4 +214,8 @@
       this.displayName = original.displayName;
       this.isVisibleInLegend = original.isVisibleInLegend;
+      this.regressionType = original.regressionType;
+      this.polynomialRegressionOrder = original.polynomialRegressionOrder;
+      this.isRegressionVisibleInLegend = original.isRegressionVisibleInLegend;
+      this.regressionDisplayName = original.regressionDisplayName;
     }
     public ScatterPlotDataRowVisualProperties() {
@@ -146,4 +225,8 @@
       displayName = String.Empty;
       isVisibleInLegend = true;
+      regressionType = ScatterPlotDataRowRegressionType.None;
+      polynomialRegressionOrder = 2;
+      isRegressionVisibleInLegend = true;
+      regressionDisplayName = string.Empty;
     }
     public ScatterPlotDataRowVisualProperties(string displayName)
