Index: trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 14384)
+++ trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 14388)
@@ -52,4 +52,9 @@
       this.bodyScrollPanel = new System.Windows.Forms.Panel();
       this.bodyTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
+      this.sizeGroupBox = new System.Windows.Forms.GroupBox();
+      this.heightLabel = new System.Windows.Forms.Label();
+      this.widthLabel = new System.Windows.Forms.Label();
+      this.heightTrackBar = new System.Windows.Forms.TrackBar();
+      this.widthTrackBar = new System.Windows.Forms.TrackBar();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
@@ -60,12 +65,25 @@
       this.rowHeaderScrollPanel.SuspendLayout();
       this.bodyScrollPanel.SuspendLayout();
+      this.sizeGroupBox.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.heightTrackBar)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.widthTrackBar)).BeginInit();
       this.SuspendLayout();
       // 
+      // checkedItemList
+      // 
+      this.checkedItemList.Size = new System.Drawing.Size(113, 369);
+      // 
       // splitContainer
       // 
       // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.sizeGroupBox);
+      // 
       // splitContainer.Panel2
       // 
       this.splitContainer.Panel2.Controls.Add(this.frameTableLayoutPanel);
+      this.splitContainer.Size = new System.Drawing.Size(863, 520);
+      this.splitContainer.SplitterDistance = 120;
       // 
       // frameTableLayoutPanel
@@ -83,5 +101,5 @@
       this.frameTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
       this.frameTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
-      this.frameTableLayoutPanel.Size = new System.Drawing.Size(739, 517);
+      this.frameTableLayoutPanel.Size = new System.Drawing.Size(739, 520);
       this.frameTableLayoutPanel.TabIndex = 0;
       // 
@@ -120,5 +138,5 @@
       this.rowHeaderScrollPanel.Margin = new System.Windows.Forms.Padding(0);
       this.rowHeaderScrollPanel.Name = "rowHeaderScrollPanel";
-      this.rowHeaderScrollPanel.Size = new System.Drawing.Size(40, 477);
+      this.rowHeaderScrollPanel.Size = new System.Drawing.Size(40, 480);
       this.rowHeaderScrollPanel.TabIndex = 4;
       // 
@@ -148,5 +166,5 @@
       this.bodyScrollPanel.Margin = new System.Windows.Forms.Padding(0);
       this.bodyScrollPanel.Name = "bodyScrollPanel";
-      this.bodyScrollPanel.Size = new System.Drawing.Size(699, 477);
+      this.bodyScrollPanel.Size = new System.Drawing.Size(699, 480);
       this.bodyScrollPanel.TabIndex = 5;
       this.bodyScrollPanel.Scroll += new System.Windows.Forms.ScrollEventHandler(this.bodyScrollPanel_Scroll);
@@ -168,4 +186,67 @@
       this.bodyTableLayoutPanel.TabIndex = 0;
       // 
+      // sizeGroupBox
+      // 
+      this.sizeGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.sizeGroupBox.Controls.Add(this.heightLabel);
+      this.sizeGroupBox.Controls.Add(this.widthLabel);
+      this.sizeGroupBox.Controls.Add(this.heightTrackBar);
+      this.sizeGroupBox.Controls.Add(this.widthTrackBar);
+      this.sizeGroupBox.Location = new System.Drawing.Point(4, 379);
+      this.sizeGroupBox.Name = "sizeGroupBox";
+      this.sizeGroupBox.Size = new System.Drawing.Size(113, 124);
+      this.sizeGroupBox.TabIndex = 5;
+      this.sizeGroupBox.TabStop = false;
+      this.sizeGroupBox.Text = "Chart Size";
+      // 
+      // heightLabel
+      // 
+      this.heightLabel.AutoSize = true;
+      this.heightLabel.Location = new System.Drawing.Point(6, 64);
+      this.heightLabel.Name = "heightLabel";
+      this.heightLabel.Size = new System.Drawing.Size(41, 13);
+      this.heightLabel.TabIndex = 2;
+      this.heightLabel.Text = "Height:";
+      // 
+      // widthLabel
+      // 
+      this.widthLabel.AutoSize = true;
+      this.widthLabel.Location = new System.Drawing.Point(6, 16);
+      this.widthLabel.Name = "widthLabel";
+      this.widthLabel.Size = new System.Drawing.Size(38, 13);
+      this.widthLabel.TabIndex = 1;
+      this.widthLabel.Text = "Width:";
+      // 
+      // heightTrackBar
+      // 
+      this.heightTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.heightTrackBar.LargeChange = 50;
+      this.heightTrackBar.Location = new System.Drawing.Point(6, 83);
+      this.heightTrackBar.Maximum = 100;
+      this.heightTrackBar.Name = "heightTrackBar";
+      this.heightTrackBar.Size = new System.Drawing.Size(101, 45);
+      this.heightTrackBar.SmallChange = 10;
+      this.heightTrackBar.TabIndex = 0;
+      this.heightTrackBar.TickFrequency = 10;
+      this.heightTrackBar.Value = 20;
+      this.heightTrackBar.ValueChanged += new System.EventHandler(this.heightTrackBar_ValueChanged);
+      // 
+      // widthTrackBar
+      // 
+      this.widthTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.widthTrackBar.LargeChange = 50;
+      this.widthTrackBar.Location = new System.Drawing.Point(6, 32);
+      this.widthTrackBar.Maximum = 100;
+      this.widthTrackBar.Name = "widthTrackBar";
+      this.widthTrackBar.Size = new System.Drawing.Size(101, 45);
+      this.widthTrackBar.SmallChange = 10;
+      this.widthTrackBar.TabIndex = 0;
+      this.widthTrackBar.TickFrequency = 10;
+      this.widthTrackBar.Value = 20;
+      this.widthTrackBar.ValueChanged += new System.EventHandler(this.widthTrackBar_ValueChanged);
+      // 
       // ScatterPlotMultiView
       // 
@@ -173,5 +254,5 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.Name = "ScatterPlotMultiView";
-      this.Size = new System.Drawing.Size(863, 517);
+      this.Size = new System.Drawing.Size(863, 520);
       this.splitContainer.Panel1.ResumeLayout(false);
       this.splitContainer.Panel2.ResumeLayout(false);
@@ -185,4 +266,8 @@
       this.bodyScrollPanel.ResumeLayout(false);
       this.bodyScrollPanel.PerformLayout();
+      this.sizeGroupBox.ResumeLayout(false);
+      this.sizeGroupBox.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.heightTrackBar)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.widthTrackBar)).EndInit();
       this.ResumeLayout(false);
 
@@ -198,4 +283,9 @@
     private System.Windows.Forms.Panel rowHeaderScrollPanel;
     private System.Windows.Forms.Panel bodyScrollPanel;
+    private System.Windows.Forms.GroupBox sizeGroupBox;
+    private System.Windows.Forms.TrackBar widthTrackBar;
+    private System.Windows.Forms.TrackBar heightTrackBar;
+    private System.Windows.Forms.Label heightLabel;
+    private System.Windows.Forms.Label widthLabel;
   }
 }
Index: trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
===================================================================
--- trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 14384)
+++ trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 14388)
@@ -16,8 +16,4 @@
   [Content(typeof(ScatterPlotContent), false)]
   public partial class ScatterPlotMultiView : PreprocessingCheckedVariablesView {
-    private const int MaxAutoSizeElements = 6;
-    private const int FixedChartWidth = 250;
-    private const int FixedChartHeight = 150;
-
     private readonly IDictionary<string, Label> columnHeaderCache;
     private readonly IDictionary<string, Label> rowHeaderCache;
@@ -27,4 +23,5 @@
       InitializeComponent();
 
+      #region Initialize Scrollbars
       columnHeaderScrollPanel.HorizontalScroll.Enabled = true;
       columnHeaderScrollPanel.VerticalScroll.Enabled = false;
@@ -42,4 +39,5 @@
       bodyScrollPanel.VerticalScroll.Visible = true;
       bodyScrollPanel.AutoScroll = true;
+      #endregion
 
       columnHeaderCache = new Dictionary<string, Label>();
@@ -72,8 +70,70 @@
     }
 
+    #region Add and remove charts
     private void AddChartToTable(string variable) {
-
-    }
-    // remove from headers and body and shift remaining slots to fill the gap
+      frameTableLayoutPanel.SuspendLayout();
+
+      // find index to insert 
+      var variables = checkedItemList.Content.Select(v => v.Value).ToList();
+      int idx = variables              // all variables
+        .TakeWhile(t => t != variable) // ... until the variable that was checked
+        .Count(IsVariableChecked);     // ... how many checked variables
+
+      // add column header
+      var colH = columnHeaderTableLayoutPanel;
+      AddColumnHelper(colH, idx, _ => GetColumnHeader(variable));
+
+      // add row header
+      var rowH = rowHeaderTableLayoutPanel;
+      AddRowHelper(rowH, idx, _ => GetRowHeader(variable));
+
+      // add body
+      var body = bodyTableLayoutPanel;
+      var vars = GetCheckedVariables();
+      var varsMinus = vars.Except(new[] { variable }).ToList();
+      AddColumnHelper(body, idx, r => GetBody(variable, varsMinus[r])); // exclude "variable" because the row for it does not exist yet
+      AddRowHelper(body, idx, c => GetBody(vars[c], variable));
+
+      frameTableLayoutPanel.ResumeLayout(true);
+    }
+    private void AddColumnHelper(TableLayoutPanel tlp, int idx, Func<int, Control> creatorFunc) {
+      // add column
+      tlp.ColumnCount++;
+      tlp.ColumnStyles.Insert(idx, new ColumnStyle(SizeType.Absolute, GetColumnWidth()));
+      // shift right
+      for (int c = tlp.ColumnCount; c >  idx - 1; c--) {
+        for (int r = 0; r < tlp.RowCount; r++) {
+          var control = tlp.GetControlFromPosition(c, r);
+          if (control != null) {
+            tlp.SetColumn(control, c + 1);
+          }
+        }
+      }
+      // add controls
+      for (int r = 0; r < tlp.RowCount; r++) {
+        if (tlp.GetControlFromPosition(idx, r) == null)
+          tlp.Controls.Add(creatorFunc(r), idx, r);
+      }
+
+    }
+    private void AddRowHelper(TableLayoutPanel tlp, int idx, Func<int, Control> creatorFunc) {
+      // add row
+      tlp.RowCount++;
+      tlp.RowStyles.Insert(idx, new RowStyle(SizeType.Absolute, GetRowHeight()));
+      // shift right
+      for (int r = tlp.RowCount; r > idx - 1; r--) {
+        for (int c = 0; c < tlp.ColumnCount; c++) {
+          var control = tlp.GetControlFromPosition(c, r);
+          if (control != null) {
+            tlp.SetRow(control, r + 1);
+          }
+        }
+      }
+      // add controls
+      for (int c = 0; c < tlp.ColumnCount; c++)
+        if (tlp.GetControlFromPosition(c, idx) == null)
+          tlp.Controls.Add(creatorFunc(c), c, idx);
+    }
+
     private void RemoveChartFromTable(string variable) {
       frameTableLayoutPanel.SuspendLayout();
@@ -96,8 +156,9 @@
       frameTableLayoutPanel.ResumeLayout(true);
     }
-
     private void RemoveColumnHelper(TableLayoutPanel tlp, int idx) {
+      // remove controls
       for (int r = 0; r < tlp.RowCount; r++)
         tlp.Controls.Remove(tlp.GetControlFromPosition(idx, r));
+      // shift left
       for (int c = idx + 1; c < tlp.ColumnCount; c++) {
         for (int r = 0; r < tlp.RowCount; r++) {
@@ -108,10 +169,13 @@
         }
       }
+      // delete column
       tlp.ColumnStyles.RemoveAt(tlp.ColumnCount - 1);
       tlp.ColumnCount--;
     }
     private void RemoveRowHelper(TableLayoutPanel tlp, int idx) {
+      // remove controls
       for (int c = 0; c < tlp.ColumnCount; c++)
         tlp.Controls.Remove(tlp.GetControlFromPosition(c, idx));
+      // shift left
       for (int r = idx + 1; r < tlp.RowCount; r++) {
         for (int c = 0; c < tlp.ColumnCount; c++) {
@@ -122,13 +186,16 @@
         }
       }
+      // delete rows
       tlp.RowStyles.RemoveAt(tlp.RowCount - 1);
       tlp.RowCount--;
     }
-
-    #region Add/Remove/Update Variable, Reset
+    #endregion
+
+    #region Add/Remove/Update Variable
     protected override void AddVariable(string name) {
       base.AddVariable(name);
-    }
-
+      if (IsVariableChecked(name))
+        AddChartToTable(name);
+    }
     protected override void RemoveVariable(string name) {
       base.RemoveVariable(name);
@@ -147,4 +214,6 @@
     protected override void UpdateVariable(string name) {
       base.UpdateVariable(name);
+      RemoveVariable(name);
+      AddVariable(name);
     }
     protected override void ResetAllVariables() {
@@ -153,6 +222,5 @@
     #endregion
 
-
-    #region Creating Header and Body 
+    #region Creating Headers and Body 
     private Label GetColumnHeader(string variable) {
       if (!columnHeaderCache.ContainsKey(variable)) {
@@ -214,7 +282,4 @@
     #endregion
 
-
-
-
     #region Generate Charts
     private void GenerateCharts() {
@@ -238,11 +303,9 @@
 
       // Set column and row layout
-      int width = variables.Count <= MaxAutoSizeElements ? bodyTableLayoutPanel.Width / variables.Count : FixedChartWidth;
-      int height = variables.Count <= MaxAutoSizeElements ? bodyTableLayoutPanel.Height / variables.Count : FixedChartHeight;
       for (int i = 0; i < variables.Count; i++) {
-        columnHeaderTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, width));
-        rowHeaderTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, height));
-        bodyTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, width));
-        bodyTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, height));
+        columnHeaderTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, GetColumnWidth()));
+        rowHeaderTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, GetRowHeight()));
+        bodyTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, GetColumnWidth()));
+        bodyTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, GetRowHeight()));
       }
 
@@ -315,4 +378,5 @@
     #endregion
 
+    #region Scrolling
     private void bodyScrollPanel_Scroll(object sender, ScrollEventArgs e) {
       SyncScroll();
@@ -325,7 +389,4 @@
     }
     private void SyncScroll() {
-      //Debug.WriteLine("H: {0} <- {1}", columnHeaderScrollPanel.HorizontalScroll.Value, bodyScrollPanel.HorizontalScroll.Value);
-      //Debug.WriteLine("V: {0} <- {1}", rowScrollLayoutPanel.VerticalScroll.Value, bodyScrollPanel.VerticalScroll.Value);
-
       frameTableLayoutPanel.SuspendRepaint();
 
@@ -344,5 +405,4 @@
       frameTableLayoutPanel.ResumeRepaint(true);
     }
-
     // add a margin to the header table layouts if the scollbar is visible to account for the width/height of the scrollbar
     private void UpdateHeaderMargin() {
@@ -350,4 +410,27 @@
       rowHeaderScrollPanel.Margin = new Padding(0, 0, 0, bodyScrollPanel.HorizontalScroll.Visible ? SystemInformation.HorizontalScrollBarHeight : 0);
     }
+    #endregion
+
+    #region Sizing of Charts
+    private int GetColumnWidth() { return (int)(bodyScrollPanel.Width * ((float)widthTrackBar.Value / 100)); }
+    private int GetRowHeight() { return (int)(bodyScrollPanel.Height * ((float)heightTrackBar.Value / 100)); }
+    private void widthTrackBar_ValueChanged(object sender, EventArgs e) {
+      frameTableLayoutPanel.SuspendRepaint();
+      for (int i = 0; i < columnHeaderTableLayoutPanel.ColumnCount; i++) {
+        columnHeaderTableLayoutPanel.ColumnStyles[i].Width = GetColumnWidth();
+        bodyTableLayoutPanel.ColumnStyles[i].Width = GetColumnWidth();
+      }
+      frameTableLayoutPanel.ResumeRepaint(true);
+    }
+    private void heightTrackBar_ValueChanged(object sender, EventArgs e) {
+      frameTableLayoutPanel.SuspendRepaint();
+
+      for (int i = 0; i < rowHeaderTableLayoutPanel.RowCount; i++) {
+        rowHeaderTableLayoutPanel.RowStyles[i].Height = GetRowHeight();
+        bodyTableLayoutPanel.RowStyles[i].Height = GetRowHeight();
+      }
+      frameTableLayoutPanel.ResumeRepaint(true);
+    }
+    #endregion
   }
 }
