Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj	(revision 14513)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj	(revision 14514)
@@ -297,4 +297,7 @@
     <Compile Include="Utils\FindPreprocessingItemsIterator.cs" />
     <Compile Include="Utils\IFindPreprocessingItemsIterator.cs" />
+    <Compile Include="Utils\VerticalLabel.cs">
+      <SubType>Component</SubType>
+    </Compile>
     <Compile Include="ViewShortcutListView.cs">
       <SubType>UserControl</SubType>
Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.Designer.cs
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.Designer.cs	(revision 14513)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.Designer.cs	(revision 14514)
@@ -47,5 +47,5 @@
       this.components = new System.ComponentModel.Container();
       this.splitContainer = new System.Windows.Forms.SplitContainer();
-      this.groupBox1 = new System.Windows.Forms.GroupBox();
+      this.variablesGroupBox = new System.Windows.Forms.GroupBox();
       this.uncheckAllButton = new System.Windows.Forms.Button();
       this.checkAllButton = new System.Windows.Forms.Button();
@@ -57,5 +57,5 @@
       this.splitContainer.Panel1.SuspendLayout();
       this.splitContainer.SuspendLayout();
-      this.groupBox1.SuspendLayout();
+      this.variablesGroupBox.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -69,22 +69,22 @@
       // splitContainer.Panel1
       // 
-      this.splitContainer.Panel1.Controls.Add(this.groupBox1);
+      this.splitContainer.Panel1.Controls.Add(this.variablesGroupBox);
       this.splitContainer.Size = new System.Drawing.Size(654, 403);
       this.splitContainer.SplitterDistance = 180;
       this.splitContainer.TabIndex = 7;
       // 
-      // groupBox1
+      // variablesGroupBox
       // 
-      this.groupBox1.Controls.Add(this.uncheckAllButton);
-      this.groupBox1.Controls.Add(this.checkAllButton);
-      this.groupBox1.Controls.Add(this.checkInputsTargetButton);
-      this.groupBox1.Controls.Add(this.variablesListView);
-      this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.groupBox1.Location = new System.Drawing.Point(0, 0);
-      this.groupBox1.Name = "groupBox1";
-      this.groupBox1.Size = new System.Drawing.Size(180, 403);
-      this.groupBox1.TabIndex = 7;
-      this.groupBox1.TabStop = false;
-      this.groupBox1.Text = "Variables";
+      this.variablesGroupBox.Controls.Add(this.uncheckAllButton);
+      this.variablesGroupBox.Controls.Add(this.checkAllButton);
+      this.variablesGroupBox.Controls.Add(this.checkInputsTargetButton);
+      this.variablesGroupBox.Controls.Add(this.variablesListView);
+      this.variablesGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.variablesGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.variablesGroupBox.Name = "variablesGroupBox";
+      this.variablesGroupBox.Size = new System.Drawing.Size(180, 403);
+      this.variablesGroupBox.TabIndex = 7;
+      this.variablesGroupBox.TabStop = false;
+      this.variablesGroupBox.Text = "Variables";
       // 
       // uncheckAllButton
@@ -153,5 +153,5 @@
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
       this.splitContainer.ResumeLayout(false);
-      this.groupBox1.ResumeLayout(false);
+      this.variablesGroupBox.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -161,5 +161,5 @@
     protected System.Windows.Forms.SplitContainer splitContainer;
     private System.Windows.Forms.ListView variablesListView;
-    private System.Windows.Forms.GroupBox groupBox1;
+    private System.Windows.Forms.GroupBox variablesGroupBox;
     private System.Windows.Forms.ToolTip toolTip;
     private System.Windows.Forms.ColumnHeader columnHeader;
Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 14513)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 14514)
@@ -57,4 +57,9 @@
       this.heightTrackBar = new System.Windows.Forms.TrackBar();
       this.widthTrackBar = new System.Windows.Forms.TrackBar();
+      this.regressionGroupBox = new System.Windows.Forms.GroupBox();
+      this.regressionTypeComboBox = new System.Windows.Forms.ComboBox();
+      this.polynomialRegressionOrderNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.orderLabel = new System.Windows.Forms.Label();
+      this.label4 = new System.Windows.Forms.Label();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
@@ -68,4 +73,6 @@
       ((System.ComponentModel.ISupportInitialize)(this.heightTrackBar)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.widthTrackBar)).BeginInit();
+      this.regressionGroupBox.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit();
       this.SuspendLayout();
       // 
@@ -76,4 +83,5 @@
       // 
       this.splitContainer.Panel1.Controls.Add(this.sizeGroupBox);
+      this.splitContainer.Panel1.Controls.Add(this.regressionGroupBox);
       // 
       // splitContainer.Panel2
@@ -187,7 +195,7 @@
       this.sizeGroupBox.Controls.Add(this.widthTrackBar);
       this.sizeGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
-      this.sizeGroupBox.Location = new System.Drawing.Point(0, 267);
+      this.sizeGroupBox.Location = new System.Drawing.Point(0, 198);
       this.sizeGroupBox.Name = "sizeGroupBox";
-      this.sizeGroupBox.Size = new System.Drawing.Size(180, 136);
+      this.sizeGroupBox.Size = new System.Drawing.Size(180, 130);
       this.sizeGroupBox.TabIndex = 5;
       this.sizeGroupBox.TabStop = false;
@@ -241,4 +249,74 @@
       this.widthTrackBar.Value = 20;
       this.widthTrackBar.ValueChanged += new System.EventHandler(this.widthTrackBar_ValueChanged);
+      // 
+      // regressionGroupBox
+      // 
+      this.regressionGroupBox.Controls.Add(this.regressionTypeComboBox);
+      this.regressionGroupBox.Controls.Add(this.polynomialRegressionOrderNumericUpDown);
+      this.regressionGroupBox.Controls.Add(this.orderLabel);
+      this.regressionGroupBox.Controls.Add(this.label4);
+      this.regressionGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
+      this.regressionGroupBox.Location = new System.Drawing.Point(0, 328);
+      this.regressionGroupBox.Name = "regressionGroupBox";
+      this.regressionGroupBox.Size = new System.Drawing.Size(180, 75);
+      this.regressionGroupBox.TabIndex = 3;
+      this.regressionGroupBox.TabStop = false;
+      this.regressionGroupBox.Text = "Regression";
+      // 
+      // 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(67, 19);
+      this.regressionTypeComboBox.Name = "regressionTypeComboBox";
+      this.regressionTypeComboBox.Size = new System.Drawing.Size(107, 21);
+      this.regressionTypeComboBox.TabIndex = 14;
+      this.regressionTypeComboBox.SelectedValueChanged += new System.EventHandler(this.regressionTypeComboBox_SelectedValueChanged);
+      // 
+      // polynomialRegressionOrderNumericUpDown
+      // 
+      this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.polynomialRegressionOrderNumericUpDown.Location = new System.Drawing.Point(67, 45);
+      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(107, 20);
+      this.polynomialRegressionOrderNumericUpDown.TabIndex = 15;
+      this.polynomialRegressionOrderNumericUpDown.Value = new decimal(new int[] {
+            2,
+            0,
+            0,
+            0});
+      this.polynomialRegressionOrderNumericUpDown.ValueChanged += new System.EventHandler(this.polynomialRegressionOrderNumericUpDown_ValueChanged);
+      // 
+      // orderLabel
+      // 
+      this.orderLabel.AutoSize = true;
+      this.orderLabel.Location = new System.Drawing.Point(6, 47);
+      this.orderLabel.Name = "orderLabel";
+      this.orderLabel.Size = new System.Drawing.Size(36, 13);
+      this.orderLabel.TabIndex = 16;
+      this.orderLabel.Text = "Order:";
+      // 
+      // 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 = 13;
+      this.label4.Text = "Type:";
       // 
       // ScatterPlotMultiView
@@ -262,4 +340,7 @@
       ((System.ComponentModel.ISupportInitialize)(this.heightTrackBar)).EndInit();
       ((System.ComponentModel.ISupportInitialize)(this.widthTrackBar)).EndInit();
+      this.regressionGroupBox.ResumeLayout(false);
+      this.regressionGroupBox.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).EndInit();
       this.ResumeLayout(false);
 
@@ -280,4 +361,9 @@
     private System.Windows.Forms.Label heightLabel;
     private System.Windows.Forms.Label widthLabel;
+    private System.Windows.Forms.GroupBox regressionGroupBox;
+    private System.Windows.Forms.ComboBox regressionTypeComboBox;
+    private System.Windows.Forms.NumericUpDown polynomialRegressionOrderNumericUpDown;
+    private System.Windows.Forms.Label orderLabel;
+    private System.Windows.Forms.Label label4;
   }
 }
Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 14513)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 14514)
@@ -10,4 +10,5 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
+using RegressionType = HeuristicLab.Analysis.ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType;
 
 namespace HeuristicLab.DataPreprocessing.Views {
@@ -16,9 +17,12 @@
   public partial class ScatterPlotMultiView : PreprocessingCheckedVariablesView {
     private readonly IDictionary<string, Label> columnHeaderCache;
-    private readonly IDictionary<string, Label> rowHeaderCache;
+    private readonly IDictionary<string, VerticalLabel> rowHeaderCache;
     private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, Control> bodyCache;
 
     public ScatterPlotMultiView() {
       InitializeComponent();
+
+      regressionTypeComboBox.DataSource = Enum.GetValues(typeof(RegressionType));
+      regressionTypeComboBox.SelectedItem = RegressionType.None;
 
       #region Initialize Scrollbars
@@ -41,5 +45,5 @@
 
       columnHeaderCache = new Dictionary<string, Label>();
-      rowHeaderCache = new Dictionary<string, Label>();
+      rowHeaderCache = new Dictionary<string, VerticalLabel>();
       bodyCache = new Dictionary<Tuple<string, string>, Control>();
 
@@ -57,4 +61,10 @@
         GenerateCharts();
       }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+      polynomialRegressionOrderNumericUpDown.Enabled = regressionType == RegressionType.Polynomial;
     }
 
@@ -239,9 +249,10 @@
     private Label GetRowHeader(string variable) {
       if (!rowHeaderCache.ContainsKey(variable)) {
-        rowHeaderCache.Add(variable, new Label() {
+        rowHeaderCache.Add(variable, new VerticalLabel() {
           Text = variable,
           TextAlign = ContentAlignment.MiddleCenter,
           Name = variable,
           Width = rowHeaderTableLayoutPanel.Width,
+          Height = columnHeaderScrollPanel.Width,
           Dock = DockStyle.Fill,
           Margin = new Padding(3)
@@ -269,8 +280,14 @@
         } else { //scatter plot
           var scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable);
-          foreach (var row in scatterPlot.Rows)
+          var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+          int order = (int)polynomialRegressionOrderNumericUpDown.Value;
+          foreach (var row in scatterPlot.Rows) {
             row.VisualProperties.PointSize = 3;
+            row.VisualProperties.IsRegressionVisibleInLegend = false;
+            row.VisualProperties.RegressionType = regressionType;
+            row.VisualProperties.PolynomialRegressionOrder = order;
+          }
           scatterPlot.VisualProperties.Title = string.Empty;
-          var scatterPlotControl = new /*Preprocessing*/ScatterPlotControl {
+          var scatterPlotControl = new ScatterPlotControl {
             Name = key.ToString(),
             Content = scatterPlot,
@@ -279,5 +296,5 @@
             //XAxisFormat = "G3"
           };
-          scatterPlotControl.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart
+          //scatterPlotControl.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart
           bodyCache.Add(key, scatterPlotControl);
         }
@@ -348,4 +365,5 @@
         c++;
       }
+      UpdateRegressionLine();
     }
 
@@ -444,4 +462,33 @@
     }
     #endregion
+
+    #region Regression Line
+    private void regressionTypeComboBox_SelectedValueChanged(object sender, EventArgs e) {
+      var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+      polynomialRegressionOrderNumericUpDown.Enabled = regressionType == RegressionType.Polynomial;
+      UpdateRegressionLine();
+    }
+
+    private void polynomialRegressionOrderNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      UpdateRegressionLine();
+    }
+
+    private void UpdateRegressionLine() {
+      var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+      int order = (int)polynomialRegressionOrderNumericUpDown.Value;
+
+      foreach (var control in bodyCache.Values) {
+        var scatterPlotControl = control as ScatterPlotControl;
+        if (scatterPlotControl != null) {
+          foreach (var row in scatterPlotControl.Content.Rows) {
+            row.VisualProperties.IsRegressionVisibleInLegend = false;
+            row.VisualProperties.RegressionType = regressionType;
+            row.VisualProperties.PolynomialRegressionOrder = order;
+          }
+        }
+      }
+    }
+    #endregion
   }
 }
+
Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs	(revision 14513)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs	(revision 14514)
@@ -53,16 +53,26 @@
       this.comboBoxYVariable = new System.Windows.Forms.ComboBox();
       this.comboBoxXVariable = new System.Windows.Forms.ComboBox();
+      this.regressionGroupBox = new System.Windows.Forms.GroupBox();
+      this.regressionTypeComboBox = new System.Windows.Forms.ComboBox();
+      this.polynomialRegressionOrderNumericUpDown = new System.Windows.Forms.NumericUpDown();
+      this.orderLabel = new System.Windows.Forms.Label();
+      this.label4 = new System.Windows.Forms.Label();
+      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
       this.groupBox1.SuspendLayout();
+      this.regressionGroupBox.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+      this.splitContainer1.Panel1.SuspendLayout();
+      this.splitContainer1.Panel2.SuspendLayout();
+      this.splitContainer1.SuspendLayout();
       this.SuspendLayout();
       // 
       // scatterPlotControl
       // 
-      this.scatterPlotControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
       this.scatterPlotControl.Content = null;
-      this.scatterPlotControl.Location = new System.Drawing.Point(169, 3);
+      this.scatterPlotControl.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.scatterPlotControl.Location = new System.Drawing.Point(0, 0);
       this.scatterPlotControl.Name = "scatterPlotControl";
-      this.scatterPlotControl.Size = new System.Drawing.Size(689, 509);
+      this.scatterPlotControl.Size = new System.Drawing.Size(687, 517);
       this.scatterPlotControl.TabIndex = 0;
       // 
@@ -75,46 +85,49 @@
       this.groupBox1.Controls.Add(this.comboBoxYVariable);
       this.groupBox1.Controls.Add(this.comboBoxXVariable);
-      this.groupBox1.Location = new System.Drawing.Point(3, 3);
+      this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
+      this.groupBox1.Location = new System.Drawing.Point(0, 0);
       this.groupBox1.Name = "groupBox1";
-      this.groupBox1.Size = new System.Drawing.Size(160, 215);
+      this.groupBox1.Size = new System.Drawing.Size(172, 137);
       this.groupBox1.TabIndex = 1;
       this.groupBox1.TabStop = false;
-      this.groupBox1.Text = "Options";
+      this.groupBox1.Text = "Variables";
       // 
       // label3
       // 
       this.label3.AutoSize = true;
-      this.label3.Location = new System.Drawing.Point(17, 141);
+      this.label3.Location = new System.Drawing.Point(6, 97);
       this.label3.Name = "label3";
-      this.label3.Size = new System.Drawing.Size(36, 13);
+      this.label3.Size = new System.Drawing.Size(39, 13);
       this.label3.TabIndex = 3;
-      this.label3.Text = "Group";
+      this.label3.Text = "Group:";
       // 
       // label2
       // 
       this.label2.AutoSize = true;
-      this.label2.Location = new System.Drawing.Point(17, 80);
+      this.label2.Location = new System.Drawing.Point(6, 63);
       this.label2.Name = "label2";
-      this.label2.Size = new System.Drawing.Size(55, 13);
+      this.label2.Size = new System.Drawing.Size(17, 13);
       this.label2.TabIndex = 3;
-      this.label2.Text = "Y Variable";
+      this.label2.Text = "Y:";
       // 
       // label1
       // 
       this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(17, 25);
+      this.label1.Location = new System.Drawing.Point(6, 29);
       this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(55, 13);
+      this.label1.Size = new System.Drawing.Size(17, 13);
       this.label1.TabIndex = 2;
-      this.label1.Text = "X Variable";
+      this.label1.Text = "X:";
       // 
       // comboBoxGroup
       // 
+      this.comboBoxGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
       this.comboBoxGroup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.comboBoxGroup.FormattingEnabled = true;
-      this.comboBoxGroup.Location = new System.Drawing.Point(20, 164);
+      this.comboBoxGroup.Location = new System.Drawing.Point(51, 94);
       this.comboBoxGroup.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
       this.comboBoxGroup.Name = "comboBoxGroup";
-      this.comboBoxGroup.Size = new System.Drawing.Size(121, 21);
+      this.comboBoxGroup.Size = new System.Drawing.Size(115, 21);
       this.comboBoxGroup.TabIndex = 1;
       this.comboBoxGroup.SelectedIndexChanged += new System.EventHandler(this.comboBoxGroup_SelectedIndexChanged);
@@ -122,10 +135,12 @@
       // comboBoxYVariable
       // 
+      this.comboBoxYVariable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
       this.comboBoxYVariable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.comboBoxYVariable.FormattingEnabled = true;
-      this.comboBoxYVariable.Location = new System.Drawing.Point(20, 103);
+      this.comboBoxYVariable.Location = new System.Drawing.Point(51, 60);
       this.comboBoxYVariable.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
       this.comboBoxYVariable.Name = "comboBoxYVariable";
-      this.comboBoxYVariable.Size = new System.Drawing.Size(121, 21);
+      this.comboBoxYVariable.Size = new System.Drawing.Size(115, 21);
       this.comboBoxYVariable.TabIndex = 1;
       this.comboBoxYVariable.SelectedIndexChanged += new System.EventHandler(this.comboBoxYVariable_SelectedIndexChanged);
@@ -133,23 +148,120 @@
       // comboBoxXVariable
       // 
+      this.comboBoxXVariable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
       this.comboBoxXVariable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.comboBoxXVariable.FormattingEnabled = true;
-      this.comboBoxXVariable.Location = new System.Drawing.Point(20, 48);
+      this.comboBoxXVariable.Location = new System.Drawing.Point(51, 26);
       this.comboBoxXVariable.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);
       this.comboBoxXVariable.Name = "comboBoxXVariable";
-      this.comboBoxXVariable.Size = new System.Drawing.Size(121, 21);
+      this.comboBoxXVariable.Size = new System.Drawing.Size(115, 21);
       this.comboBoxXVariable.TabIndex = 0;
       this.comboBoxXVariable.SelectedIndexChanged += new System.EventHandler(this.comboBoxXVariable_SelectedIndexChanged);
       // 
+      // regressionGroupBox
+      // 
+      this.regressionGroupBox.Controls.Add(this.regressionTypeComboBox);
+      this.regressionGroupBox.Controls.Add(this.polynomialRegressionOrderNumericUpDown);
+      this.regressionGroupBox.Controls.Add(this.orderLabel);
+      this.regressionGroupBox.Controls.Add(this.label4);
+      this.regressionGroupBox.Dock = System.Windows.Forms.DockStyle.Top;
+      this.regressionGroupBox.Location = new System.Drawing.Point(0, 137);
+      this.regressionGroupBox.Name = "regressionGroupBox";
+      this.regressionGroupBox.Size = new System.Drawing.Size(172, 78);
+      this.regressionGroupBox.TabIndex = 4;
+      this.regressionGroupBox.TabStop = false;
+      this.regressionGroupBox.Text = "Regression";
+      // 
+      // 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(51, 19);
+      this.regressionTypeComboBox.Name = "regressionTypeComboBox";
+      this.regressionTypeComboBox.Size = new System.Drawing.Size(115, 21);
+      this.regressionTypeComboBox.TabIndex = 14;
+      this.regressionTypeComboBox.SelectedIndexChanged += new System.EventHandler(this.regressionTypeComboBox_SelectedIndexChanged);
+      // 
+      // polynomialRegressionOrderNumericUpDown
+      // 
+      this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.polynomialRegressionOrderNumericUpDown.Location = new System.Drawing.Point(51, 47);
+      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(115, 20);
+      this.polynomialRegressionOrderNumericUpDown.TabIndex = 15;
+      this.polynomialRegressionOrderNumericUpDown.Value = new decimal(new int[] {
+            2,
+            0,
+            0,
+            0});
+      this.polynomialRegressionOrderNumericUpDown.ValueChanged += new System.EventHandler(this.polynomialRegressionOrderNumericUpDown_ValueChanged);
+      // 
+      // orderLabel
+      // 
+      this.orderLabel.AutoSize = true;
+      this.orderLabel.Location = new System.Drawing.Point(6, 49);
+      this.orderLabel.Name = "orderLabel";
+      this.orderLabel.Size = new System.Drawing.Size(36, 13);
+      this.orderLabel.TabIndex = 16;
+      this.orderLabel.Text = "Order:";
+      // 
+      // 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 = 13;
+      this.label4.Text = "Type:";
+      // 
+      // splitContainer1
+      // 
+      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer1.Name = "splitContainer1";
+      // 
+      // splitContainer1.Panel1
+      // 
+      this.splitContainer1.Panel1.Controls.Add(this.regressionGroupBox);
+      this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
+      // 
+      // splitContainer1.Panel2
+      // 
+      this.splitContainer1.Panel2.Controls.Add(this.scatterPlotControl);
+      this.splitContainer1.Size = new System.Drawing.Size(863, 517);
+      this.splitContainer1.SplitterDistance = 172;
+      this.splitContainer1.TabIndex = 5;
+      // 
       // ScatterPlotSingleView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.groupBox1);
-      this.Controls.Add(this.scatterPlotControl);
+      this.Controls.Add(this.splitContainer1);
       this.Name = "ScatterPlotSingleView";
       this.Size = new System.Drawing.Size(863, 517);
       this.groupBox1.ResumeLayout(false);
       this.groupBox1.PerformLayout();
+      this.regressionGroupBox.ResumeLayout(false);
+      this.regressionGroupBox.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).EndInit();
+      this.splitContainer1.Panel1.ResumeLayout(false);
+      this.splitContainer1.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+      this.splitContainer1.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -166,4 +278,10 @@
     private System.Windows.Forms.ComboBox comboBoxGroup;
     private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.GroupBox regressionGroupBox;
+    private System.Windows.Forms.ComboBox regressionTypeComboBox;
+    private System.Windows.Forms.NumericUpDown polynomialRegressionOrderNumericUpDown;
+    private System.Windows.Forms.Label orderLabel;
+    private System.Windows.Forms.Label label4;
+    private System.Windows.Forms.SplitContainer splitContainer1;
   }
 }
Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs	(revision 14513)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs	(revision 14514)
@@ -26,4 +26,5 @@
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
+using RegressionType = HeuristicLab.Analysis.ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType;
 
 namespace HeuristicLab.DataPreprocessing.Views {
@@ -40,4 +41,7 @@
     public ScatterPlotSingleView() {
       InitializeComponent();
+
+      regressionTypeComboBox.DataSource = Enum.GetValues(typeof(RegressionType));
+      regressionTypeComboBox.SelectedItem = RegressionType.None;
     }
 
@@ -88,6 +92,12 @@
         var groupVariable = (string)comboBoxGroup.SelectedItem;
         ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, groupVariable);
-        foreach (var row in scatterPlot.Rows)
+        var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+        int order = (int)polynomialRegressionOrderNumericUpDown.Value;
+        foreach (var row in scatterPlot.Rows) {
           row.VisualProperties.PointSize = 6;
+          row.VisualProperties.IsRegressionVisibleInLegend = false;
+          row.VisualProperties.RegressionType = regressionType;
+          row.VisualProperties.PolynomialRegressionOrder = order;
+        }
         var vp = scatterPlot.VisualProperties;
         vp.Title = string.Empty;
@@ -144,4 +154,28 @@
       UpdateScatterPlot();
     }
+
+    #region Regression Line
+    private void regressionTypeComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+      polynomialRegressionOrderNumericUpDown.Enabled = regressionType == RegressionType.Polynomial;
+      UpdateRegressionLine();
+    }
+
+    private void polynomialRegressionOrderNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      UpdateRegressionLine();
+    }
+
+    private void UpdateRegressionLine() {
+      var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
+      int order = (int)polynomialRegressionOrderNumericUpDown.Value;
+
+      foreach (var row in scatterPlotControl.Content.Rows) {
+        row.VisualProperties.IsRegressionVisibleInLegend = false;
+        row.VisualProperties.RegressionType = regressionType;
+        row.VisualProperties.PolynomialRegressionOrder = order;
+      }
+    }
+    #endregion
   }
 }
+
Index: /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/Utils/VerticalLabel.cs
===================================================================
--- /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/Utils/VerticalLabel.cs	(revision 14514)
+++ /branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/Utils/VerticalLabel.cs	(revision 14514)
@@ -0,0 +1,40 @@
+﻿
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Drawing;
+using System.Windows.Forms;
+
+namespace HeuristicLab.DataPreprocessing.Views {
+  public class VerticalLabel : Label {
+    protected override void OnPaint(PaintEventArgs e) {
+      Brush b = new SolidBrush(ForeColor);
+      var stringFormat = new StringFormat(StringFormatFlags.DirectionVertical);
+
+      var textSize = e.Graphics.MeasureString(Text, Font, PointF.Empty, stringFormat);
+      e.Graphics.TranslateTransform(Width / 2 + textSize.Width / 2, Height / 2 + textSize.Height / 2);
+      e.Graphics.RotateTransform(180);
+
+      e.Graphics.DrawString(Text, Font, b, PointF.Empty, stringFormat);
+    }
+  }
+}
+
