Index: branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs
===================================================================
--- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs	(revision 14983)
+++ branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs	(revision 14993)
@@ -45,15 +45,25 @@
     /// </summary>
     private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
       this.optionsBox = new System.Windows.Forms.GroupBox();
-      this.label2 = new System.Windows.Forms.Label();
-      this.label1 = new System.Windows.Forms.Label();
+      this.groupingTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
+      this.variableLabel = new System.Windows.Forms.Label();
+      this.orderLabel = new System.Windows.Forms.Label();
+      this.aggregationLabel = new System.Windows.Forms.Label();
+      this.orderComboBox = new System.Windows.Forms.ComboBox();
+      this.classifierComboBox = new System.Windows.Forms.ComboBox();
       this.aggregationComboBox = new System.Windows.Forms.ComboBox();
-      this.classifierComboBox = new System.Windows.Forms.ComboBox();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
       this.splitContainer.SuspendLayout();
       this.optionsBox.SuspendLayout();
+      this.groupingTableLayoutPanel.SuspendLayout();
       this.SuspendLayout();
       // 
+      // sizeGroupBox
+      // 
+      this.sizeGroupBox.Location = new System.Drawing.Point(0, 258);
+      // 
       // splitContainer
       // 
@@ -65,57 +75,101 @@
       // optionsBox
       // 
-      this.optionsBox.Controls.Add(this.label2);
-      this.optionsBox.Controls.Add(this.label1);
-      this.optionsBox.Controls.Add(this.aggregationComboBox);
-      this.optionsBox.Controls.Add(this.classifierComboBox);
+      this.optionsBox.Controls.Add(this.groupingTableLayoutPanel);
       this.optionsBox.Dock = System.Windows.Forms.DockStyle.Bottom;
-      this.optionsBox.Location = new System.Drawing.Point(0, 292);
+      this.optionsBox.Location = new System.Drawing.Point(0, 302);
       this.optionsBox.Name = "optionsBox";
-      this.optionsBox.Size = new System.Drawing.Size(180, 111);
+      this.optionsBox.Size = new System.Drawing.Size(180, 101);
       this.optionsBox.TabIndex = 7;
       this.optionsBox.TabStop = false;
       this.optionsBox.Text = "Grouping Options";
       // 
-      // label2
-      // 
-      this.label2.AutoSize = true;
-      this.label2.Location = new System.Drawing.Point(2, 61);
-      this.label2.Name = "label2";
-      this.label2.Size = new System.Drawing.Size(67, 13);
-      this.label2.TabIndex = 2;
-      this.label2.Text = "Aggregation:";
-      // 
-      // label1
-      // 
-      this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(3, 15);
-      this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(48, 13);
-      this.label1.TabIndex = 2;
-      this.label1.Text = "Variable:";
+      // groupingTableLayoutPanel
+      // 
+      this.groupingTableLayoutPanel.ColumnCount = 2;
+      this.groupingTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
+      this.groupingTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+      this.groupingTableLayoutPanel.Controls.Add(this.variableLabel, 0, 0);
+      this.groupingTableLayoutPanel.Controls.Add(this.orderLabel, 0, 2);
+      this.groupingTableLayoutPanel.Controls.Add(this.aggregationLabel, 0, 1);
+      this.groupingTableLayoutPanel.Controls.Add(this.orderComboBox, 1, 2);
+      this.groupingTableLayoutPanel.Controls.Add(this.classifierComboBox, 1, 0);
+      this.groupingTableLayoutPanel.Controls.Add(this.aggregationComboBox, 1, 1);
+      this.groupingTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.groupingTableLayoutPanel.Location = new System.Drawing.Point(3, 16);
+      this.groupingTableLayoutPanel.Name = "groupingTableLayoutPanel";
+      this.groupingTableLayoutPanel.RowCount = 3;
+      this.groupingTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
+      this.groupingTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
+      this.groupingTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
+      this.groupingTableLayoutPanel.Size = new System.Drawing.Size(174, 82);
+      this.groupingTableLayoutPanel.TabIndex = 3;
+      // 
+      // variableLabel
+      // 
+      this.variableLabel.AutoSize = true;
+      this.variableLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.variableLabel.Location = new System.Drawing.Point(3, 0);
+      this.variableLabel.Name = "variableLabel";
+      this.variableLabel.Size = new System.Drawing.Size(48, 27);
+      this.variableLabel.TabIndex = 2;
+      this.variableLabel.Text = "Variable:";
+      this.variableLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      // 
+      // orderLabel
+      // 
+      this.orderLabel.AutoSize = true;
+      this.orderLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.orderLabel.Location = new System.Drawing.Point(3, 54);
+      this.orderLabel.Name = "orderLabel";
+      this.orderLabel.Size = new System.Drawing.Size(48, 28);
+      this.orderLabel.TabIndex = 2;
+      this.orderLabel.Text = "Order:";
+      this.orderLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.toolTip.SetToolTip(this.orderLabel, "Order of Legend Entries");
+      // 
+      // aggregationLabel
+      // 
+      this.aggregationLabel.AutoSize = true;
+      this.aggregationLabel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.aggregationLabel.Location = new System.Drawing.Point(3, 27);
+      this.aggregationLabel.Name = "aggregationLabel";
+      this.aggregationLabel.Size = new System.Drawing.Size(48, 27);
+      this.aggregationLabel.TabIndex = 2;
+      this.aggregationLabel.Text = "Aggr.:";
+      this.aggregationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.toolTip.SetToolTip(this.aggregationLabel, "Aggregation");
+      // 
+      // orderComboBox
+      // 
+      this.orderComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.orderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.orderComboBox.FormattingEnabled = true;
+      this.orderComboBox.Location = new System.Drawing.Point(57, 57);
+      this.orderComboBox.Name = "orderComboBox";
+      this.orderComboBox.Size = new System.Drawing.Size(114, 21);
+      this.orderComboBox.TabIndex = 1;
+      this.orderComboBox.SelectedIndexChanged += new System.EventHandler(this.orderComboBox_SelectedIndexChanged);
+      // 
+      // classifierComboBox
+      // 
+      this.classifierComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.classifierComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.classifierComboBox.FormattingEnabled = true;
+      this.classifierComboBox.Location = new System.Drawing.Point(57, 3);
+      this.classifierComboBox.Name = "classifierComboBox";
+      this.classifierComboBox.Size = new System.Drawing.Size(114, 21);
+      this.classifierComboBox.TabIndex = 1;
+      this.classifierComboBox.SelectedIndexChanged += new System.EventHandler(this.classifierComboBox_SelectedIndexChanged);
       // 
       // aggregationComboBox
       // 
-      this.aggregationComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
+      this.aggregationComboBox.Dock = System.Windows.Forms.DockStyle.Fill;
       this.aggregationComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.aggregationComboBox.FormattingEnabled = true;
-      this.aggregationComboBox.Location = new System.Drawing.Point(5, 79);
+      this.aggregationComboBox.Location = new System.Drawing.Point(57, 30);
       this.aggregationComboBox.Name = "aggregationComboBox";
-      this.aggregationComboBox.Size = new System.Drawing.Size(169, 21);
+      this.aggregationComboBox.Size = new System.Drawing.Size(114, 21);
       this.aggregationComboBox.TabIndex = 1;
       this.aggregationComboBox.SelectedIndexChanged += new System.EventHandler(this.aggregationComboBox_SelectedIndexChanged);
-      // 
-      // classifierComboBox
-      // 
-      this.classifierComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.classifierComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-      this.classifierComboBox.FormattingEnabled = true;
-      this.classifierComboBox.Location = new System.Drawing.Point(5, 33);
-      this.classifierComboBox.Name = "classifierComboBox";
-      this.classifierComboBox.Size = new System.Drawing.Size(169, 21);
-      this.classifierComboBox.TabIndex = 1;
-      this.classifierComboBox.SelectedIndexChanged += new System.EventHandler(this.classifierComboBox_SelectedIndexChanged);
       // 
       // HistogramView
@@ -129,5 +183,6 @@
       this.splitContainer.ResumeLayout(false);
       this.optionsBox.ResumeLayout(false);
-      this.optionsBox.PerformLayout();
+      this.groupingTableLayoutPanel.ResumeLayout(false);
+      this.groupingTableLayoutPanel.PerformLayout();
       this.ResumeLayout(false);
 
@@ -138,7 +193,11 @@
     private System.Windows.Forms.GroupBox optionsBox;
     private System.Windows.Forms.ComboBox classifierComboBox;
-    private System.Windows.Forms.Label label1;
-    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.Label variableLabel;
+    private System.Windows.Forms.Label aggregationLabel;
     private System.Windows.Forms.ComboBox aggregationComboBox;
+    private System.Windows.Forms.TableLayoutPanel groupingTableLayoutPanel;
+    private System.Windows.Forms.Label orderLabel;
+    private System.Windows.Forms.ComboBox orderComboBox;
+    private System.Windows.Forms.ToolTip toolTip;
   }
 }
Index: branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs
===================================================================
--- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs	(revision 14983)
+++ branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs	(revision 14993)
@@ -28,4 +28,5 @@
   [Content(typeof(HistogramContent), true)]
   public partial class HistogramView : PreprocessingChartView {
+
     public new HistogramContent Content {
       get { return (HistogramContent)base.Content; }
@@ -37,4 +38,6 @@
       aggregationComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowHistogramAggregation));
       aggregationComboBox.SelectedItem = DataRowVisualProperties.DataRowHistogramAggregation.Overlapping;
+      orderComboBox.DataSource = Enum.GetValues(typeof(PreprocessingChartContent.LegendOrder));
+      orderComboBox.SelectedItem = PreprocessingChartContent.LegendOrder.Appearance;
     }
 
@@ -55,5 +58,5 @@
     protected override DataTable CreateDataTable(string variableName) {
       var aggregation = (DataRowVisualProperties.DataRowHistogramAggregation)aggregationComboBox.SelectedItem;
-      return HistogramContent.CreateHistogram(Content.PreprocessingData, variableName, Content.GroupingVariableName, aggregation);
+      return HistogramContent.CreateHistogram(Content.PreprocessingData, variableName, Content.GroupingVariableName, aggregation, Content.Order);
     }
 
@@ -73,4 +76,12 @@
       }
     }
+
+    private void orderComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      Content.Order = (PreprocessingChartContent.LegendOrder)orderComboBox.SelectedItem;
+
+      // rebuild datatables
+      InitData();
+      GenerateLayout();
+    }
   }
 }
Index: branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
===================================================================
--- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 14983)
+++ branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs	(revision 14993)
@@ -64,10 +64,14 @@
       this.polynomialRegressionOrderNumericUpDown = new System.Windows.Forms.NumericUpDown();
       this.orderLabel = new System.Windows.Forms.Label();
-      this.label4 = new System.Windows.Forms.Label();
+      this.regressionTyleLabel = new System.Windows.Forms.Label();
       this.groupingOptionsBox = new System.Windows.Forms.GroupBox();
+      this.legendGroupBox = new System.Windows.Forms.GroupBox();
+      this.legendCheckbox = new System.Windows.Forms.CheckBox();
+      this.legendOrderComboBox = new System.Windows.Forms.ComboBox();
+      this.legendOrderLabel = new System.Windows.Forms.Label();
       this.aggregationLabel = new System.Windows.Forms.Label();
       this.aggregationComboBox = new System.Windows.Forms.ComboBox();
       this.groupingComboBox = new System.Windows.Forms.ComboBox();
-      this.label1 = new System.Windows.Forms.Label();
+      this.opacityLabel = new System.Windows.Forms.Label();
       this.pointOpacityNumericUpDown = new System.Windows.Forms.NumericUpDown();
       this.pointsGroupBox = new System.Windows.Forms.GroupBox();
@@ -87,4 +91,5 @@
       ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit();
       this.groupingOptionsBox.SuspendLayout();
+      this.legendGroupBox.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.pointOpacityNumericUpDown)).BeginInit();
       this.pointsGroupBox.SuspendLayout();
@@ -212,5 +217,5 @@
       this.sizeGroupBox.Controls.Add(this.lockAspectCheckBox);
       this.sizeGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
-      this.sizeGroupBox.Location = new System.Drawing.Point(0, 78);
+      this.sizeGroupBox.Location = new System.Drawing.Point(0, 30);
       this.sizeGroupBox.Name = "sizeGroupBox";
       this.sizeGroupBox.Size = new System.Drawing.Size(180, 94);
@@ -338,5 +343,5 @@
       this.regressionGroupBox.Controls.Add(this.polynomialRegressionOrderNumericUpDown);
       this.regressionGroupBox.Controls.Add(this.orderLabel);
-      this.regressionGroupBox.Controls.Add(this.label4);
+      this.regressionGroupBox.Controls.Add(this.regressionTyleLabel);
       this.regressionGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
       this.regressionGroupBox.Location = new System.Drawing.Point(0, 322);
@@ -394,30 +399,78 @@
       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:";
+      // regressionTyleLabel
+      // 
+      this.regressionTyleLabel.AutoSize = true;
+      this.regressionTyleLabel.Location = new System.Drawing.Point(6, 22);
+      this.regressionTyleLabel.Name = "regressionTyleLabel";
+      this.regressionTyleLabel.Size = new System.Drawing.Size(34, 13);
+      this.regressionTyleLabel.TabIndex = 13;
+      this.regressionTyleLabel.Text = "Type:";
       // 
       // groupingOptionsBox
       // 
+      this.groupingOptionsBox.Controls.Add(this.legendGroupBox);
       this.groupingOptionsBox.Controls.Add(this.aggregationLabel);
       this.groupingOptionsBox.Controls.Add(this.aggregationComboBox);
       this.groupingOptionsBox.Controls.Add(this.groupingComboBox);
       this.groupingOptionsBox.Dock = System.Windows.Forms.DockStyle.Bottom;
-      this.groupingOptionsBox.Location = new System.Drawing.Point(0, 241);
+      this.groupingOptionsBox.Location = new System.Drawing.Point(0, 193);
       this.groupingOptionsBox.Name = "groupingOptionsBox";
-      this.groupingOptionsBox.Size = new System.Drawing.Size(180, 81);
+      this.groupingOptionsBox.Size = new System.Drawing.Size(180, 129);
       this.groupingOptionsBox.TabIndex = 8;
       this.groupingOptionsBox.TabStop = false;
       this.groupingOptionsBox.Text = "Grouping";
       // 
+      // legendGroupBox
+      // 
+      this.legendGroupBox.Controls.Add(this.legendCheckbox);
+      this.legendGroupBox.Controls.Add(this.legendOrderComboBox);
+      this.legendGroupBox.Controls.Add(this.legendOrderLabel);
+      this.legendGroupBox.Enabled = false;
+      this.legendGroupBox.Location = new System.Drawing.Point(9, 73);
+      this.legendGroupBox.Name = "legendGroupBox";
+      this.legendGroupBox.Size = new System.Drawing.Size(164, 50);
+      this.legendGroupBox.TabIndex = 7;
+      this.legendGroupBox.TabStop = false;
+      this.legendGroupBox.Text = "Legend";
+      // 
+      // legendCheckbox
+      // 
+      this.legendCheckbox.AutoSize = true;
+      this.legendCheckbox.Checked = true;
+      this.legendCheckbox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.legendCheckbox.Location = new System.Drawing.Point(56, -1);
+      this.legendCheckbox.Name = "legendCheckbox";
+      this.legendCheckbox.Size = new System.Drawing.Size(56, 17);
+      this.legendCheckbox.TabIndex = 0;
+      this.legendCheckbox.Text = "Visible";
+      this.legendCheckbox.UseVisualStyleBackColor = true;
+      this.legendCheckbox.CheckedChanged += new System.EventHandler(this.legendCheckbox_CheckedChanged);
+      // 
+      // legendOrderComboBox
+      // 
+      this.legendOrderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.legendOrderComboBox.FormattingEnabled = true;
+      this.legendOrderComboBox.Location = new System.Drawing.Point(49, 19);
+      this.legendOrderComboBox.Name = "legendOrderComboBox";
+      this.legendOrderComboBox.Size = new System.Drawing.Size(109, 21);
+      this.legendOrderComboBox.TabIndex = 5;
+      this.legendOrderComboBox.SelectedIndexChanged += new System.EventHandler(this.legendOrderComboBox_SelectedIndexChanged);
+      // 
+      // legendOrderLabel
+      // 
+      this.legendOrderLabel.AutoSize = true;
+      this.legendOrderLabel.Location = new System.Drawing.Point(7, 22);
+      this.legendOrderLabel.Name = "legendOrderLabel";
+      this.legendOrderLabel.Size = new System.Drawing.Size(36, 13);
+      this.legendOrderLabel.TabIndex = 4;
+      this.legendOrderLabel.Text = "Order:";
+      this.legendOrderLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      // 
       // aggregationLabel
       // 
       this.aggregationLabel.AutoSize = true;
-      this.aggregationLabel.Location = new System.Drawing.Point(6, 49);
+      this.aggregationLabel.Enabled = false;
+      this.aggregationLabel.Location = new System.Drawing.Point(5, 49);
       this.aggregationLabel.Name = "aggregationLabel";
       this.aggregationLabel.Size = new System.Drawing.Size(67, 13);
@@ -450,12 +503,12 @@
       this.groupingComboBox.SelectedIndexChanged += new System.EventHandler(this.groupingComboBox_SelectedIndexChanged);
       // 
-      // label1
-      // 
-      this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(6, 43);
-      this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(46, 13);
-      this.label1.TabIndex = 7;
-      this.label1.Text = "Opacity:";
+      // opacityLabel
+      // 
+      this.opacityLabel.AutoSize = true;
+      this.opacityLabel.Location = new System.Drawing.Point(6, 43);
+      this.opacityLabel.Name = "opacityLabel";
+      this.opacityLabel.Size = new System.Drawing.Size(46, 13);
+      this.opacityLabel.TabIndex = 7;
+      this.opacityLabel.Text = "Opacity:";
       // 
       // pointOpacityNumericUpDown
@@ -490,7 +543,7 @@
       this.pointsGroupBox.Controls.Add(this.pointSizeLabel);
       this.pointsGroupBox.Controls.Add(this.pointSizeNumericUpDown);
-      this.pointsGroupBox.Controls.Add(this.label1);
+      this.pointsGroupBox.Controls.Add(this.opacityLabel);
       this.pointsGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;
-      this.pointsGroupBox.Location = new System.Drawing.Point(0, 172);
+      this.pointsGroupBox.Location = new System.Drawing.Point(0, 124);
       this.pointsGroupBox.Name = "pointsGroupBox";
       this.pointsGroupBox.Size = new System.Drawing.Size(180, 69);
@@ -525,4 +578,6 @@
       this.groupingOptionsBox.ResumeLayout(false);
       this.groupingOptionsBox.PerformLayout();
+      this.legendGroupBox.ResumeLayout(false);
+      this.legendGroupBox.PerformLayout();
       ((System.ComponentModel.ISupportInitialize)(this.pointOpacityNumericUpDown)).EndInit();
       this.pointsGroupBox.ResumeLayout(false);
@@ -548,5 +603,5 @@
     private System.Windows.Forms.NumericUpDown polynomialRegressionOrderNumericUpDown;
     private System.Windows.Forms.Label orderLabel;
-    private System.Windows.Forms.Label label4;
+    private System.Windows.Forms.Label regressionTyleLabel;
     private System.Windows.Forms.GroupBox groupingOptionsBox;
     private System.Windows.Forms.ComboBox groupingComboBox;
@@ -560,5 +615,9 @@
     private System.Windows.Forms.GroupBox pointsGroupBox;
     private System.Windows.Forms.NumericUpDown pointOpacityNumericUpDown;
-    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.Label opacityLabel;
+    private System.Windows.Forms.Label legendOrderLabel;
+    private System.Windows.Forms.ComboBox legendOrderComboBox;
+    private System.Windows.Forms.GroupBox legendGroupBox;
+    private System.Windows.Forms.CheckBox legendCheckbox;
   }
 }
Index: branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
===================================================================
--- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 14983)
+++ branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs	(revision 14993)
@@ -54,4 +54,7 @@
       aggregationComboBox.SelectedItem = AggregationType.Overlapping;
 
+      legendOrderComboBox.DataSource = Enum.GetValues(typeof(PreprocessingChartContent.LegendOrder));
+      legendOrderComboBox.SelectedItem = PreprocessingChartContent.LegendOrder.Appearance;
+
       #region Initialize Scrollbars
       columnHeaderScrollPanel.HorizontalScroll.Enabled = true;
@@ -412,8 +415,10 @@
             rowVariable,
             (string)groupingComboBox.SelectedItem,
-            (AggregationType)aggregationComboBox.SelectedItem);
+            (AggregationType)aggregationComboBox.SelectedItem,
+            (PreprocessingChartContent.LegendOrder)legendOrderComboBox.SelectedItem);
           dataTable.VisualProperties.Title = string.Empty;
-          foreach (var dataRow in dataTable.Rows)
-            dataRow.VisualProperties.IsVisibleInLegend = groupingComboBox.SelectedIndex > 0;
+          foreach (var dataRow in dataTable.Rows) {
+            dataRow.VisualProperties.IsVisibleInLegend = legendCheckbox.Checked && groupingComboBox.SelectedIndex > 0;
+          }
           var pcv = new DataTableView {
             Name = key.ToString(),
@@ -430,5 +435,6 @@
             colVariable,
             rowVariable,
-            (string)groupingComboBox.SelectedItem);
+            (string)groupingComboBox.SelectedItem,
+            (PreprocessingChartContent.LegendOrder)legendOrderComboBox.SelectedItem);
           var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
           int order = (int)polynomialRegressionOrderNumericUpDown.Value;
@@ -439,5 +445,5 @@
             row.VisualProperties.Color = Color.FromArgb((int)(pointOpacityNumericUpDown.Value * 255),
               row.VisualProperties.Color.IsEmpty ? colors[i++ % colors.Length] : row.VisualProperties.Color);
-            //row.VisualProperties.IsVisibleInLegend = true;
+            row.VisualProperties.IsVisibleInLegend = legendCheckbox.Checked && groupingComboBox.SelectedIndex > 0;
             row.VisualProperties.IsRegressionVisibleInLegend = false;
             row.VisualProperties.RegressionType = regressionType;
@@ -467,5 +473,5 @@
     #region Generate Charts
     private void GenerateCharts(bool clearCache) {
-      if (suppressCheckedChangedUpdate) return;
+      if (Content == null || suppressCheckedChangedUpdate) return;
 
       // Clear old layouts and cache
@@ -477,7 +483,5 @@
 
       if (clearCache) {
-        foreach (var control in bodyCache.Values
-          .Concat(columnHeaderCache.Values)
-          .Concat(rowHeaderCache.Values)) {
+        foreach (var control in bodyCache.Values.Concat(columnHeaderCache.Values).Concat(rowHeaderCache.Values)) {
           control.Dispose();
         }
@@ -549,5 +553,5 @@
       }
 
-      MainFormManager.MainForm.ShowContent(scatterContent, typeof(ScatterPlotSingleView));  // open in new tab
+      MainFormManager.MainForm.ShowContent(scatterContent, typeof(ScatterPlotSingleView)); // open in new tab
     }
 
@@ -568,5 +572,5 @@
         }
       }
-      MainFormManager.MainForm.ShowContent(histoContent, typeof(HistogramView));  // open in new tab
+      MainFormManager.MainForm.ShowContent(histoContent, typeof(HistogramView)); // open in new tab
     }
     #endregion
@@ -716,5 +720,7 @@
     #region Grouping
     private void groupingComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      aggregationLabel.Enabled = groupingComboBox.SelectedIndex > 0;
       aggregationComboBox.Enabled = groupingComboBox.SelectedIndex > 0;
+      legendGroupBox.Enabled = groupingComboBox.SelectedIndex > 0;
       GenerateCharts(true); // new series within charts -> clear cache
     }
@@ -736,4 +742,25 @@
       }
     }
+
+    private void legendCheckbox_CheckedChanged(object sender, EventArgs e) {
+      foreach (var control in bodyCache.ToList()) {
+        var histogramControl = control.Value as DataTableView;
+        if (histogramControl != null) {
+          foreach (var row in histogramControl.Content.Rows) {
+            row.VisualProperties.IsVisibleInLegend = legendCheckbox.Checked && groupingComboBox.SelectedIndex > 0;
+          }
+        }
+        var scatterplotControl = control.Value as ScatterPlotView;
+        if (scatterplotControl != null) {
+          foreach (var row in scatterplotControl.Content.Rows) {
+            row.VisualProperties.IsVisibleInLegend = legendCheckbox.Checked && groupingComboBox.SelectedIndex > 0;
+          }
+        }
+      }
+    }
+
+    private void legendOrderComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      GenerateCharts(true);
+    }
     #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 14983)
+++ branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs	(revision 14993)
@@ -47,9 +47,11 @@
       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScatterPlotSingleView));
       this.scatterPlotView = new HeuristicLab.Analysis.Views.ScatterPlotView();
-      this.groupBox1 = new System.Windows.Forms.GroupBox();
+      this.variablesGroupBox = new System.Windows.Forms.GroupBox();
+      this.orderComboBox = new System.Windows.Forms.ComboBox();
+      this.legendOrderLabel = new System.Windows.Forms.Label();
       this.useGradientCheckBox = new System.Windows.Forms.CheckBox();
-      this.label3 = new System.Windows.Forms.Label();
-      this.label2 = new System.Windows.Forms.Label();
-      this.label1 = new System.Windows.Forms.Label();
+      this.groupLabel = new System.Windows.Forms.Label();
+      this.yLabel = new System.Windows.Forms.Label();
+      this.xLabel = new System.Windows.Forms.Label();
       this.comboBoxGroup = new System.Windows.Forms.ComboBox();
       this.comboBoxYVariable = new System.Windows.Forms.ComboBox();
@@ -59,22 +61,22 @@
       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.regressionTypeLabel = new System.Windows.Forms.Label();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
       this.gradientPanel = new System.Windows.Forms.Panel();
       this.gradientPictureBox = new System.Windows.Forms.PictureBox();
       this.gradientMinimumLabel = new System.Windows.Forms.Label();
       this.gradientMaximumLabel = new System.Windows.Forms.Label();
-      this.groupBox1.SuspendLayout();
+      this.variablesGroupBox.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();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
       this.gradientPanel.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.gradientPictureBox)).BeginInit();
       this.SuspendLayout();
       // 
-      // ScatterPlotView
+      // scatterPlotView
       // 
       this.scatterPlotView.Caption = "View";
@@ -84,23 +86,46 @@
       this.scatterPlotView.Name = "scatterPlotView";
       this.scatterPlotView.ReadOnly = false;
+      this.scatterPlotView.ShowName = true;
       this.scatterPlotView.Size = new System.Drawing.Size(618, 517);
       this.scatterPlotView.TabIndex = 0;
       // 
-      // groupBox1
-      // 
-      this.groupBox1.Controls.Add(this.useGradientCheckBox);
-      this.groupBox1.Controls.Add(this.label3);
-      this.groupBox1.Controls.Add(this.label2);
-      this.groupBox1.Controls.Add(this.label1);
-      this.groupBox1.Controls.Add(this.comboBoxGroup);
-      this.groupBox1.Controls.Add(this.comboBoxYVariable);
-      this.groupBox1.Controls.Add(this.comboBoxXVariable);
-      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(172, 150);
-      this.groupBox1.TabIndex = 1;
-      this.groupBox1.TabStop = false;
-      this.groupBox1.Text = "Variables";
+      // variablesGroupBox
+      // 
+      this.variablesGroupBox.Controls.Add(this.orderComboBox);
+      this.variablesGroupBox.Controls.Add(this.legendOrderLabel);
+      this.variablesGroupBox.Controls.Add(this.useGradientCheckBox);
+      this.variablesGroupBox.Controls.Add(this.groupLabel);
+      this.variablesGroupBox.Controls.Add(this.yLabel);
+      this.variablesGroupBox.Controls.Add(this.xLabel);
+      this.variablesGroupBox.Controls.Add(this.comboBoxGroup);
+      this.variablesGroupBox.Controls.Add(this.comboBoxYVariable);
+      this.variablesGroupBox.Controls.Add(this.comboBoxXVariable);
+      this.variablesGroupBox.Dock = System.Windows.Forms.DockStyle.Top;
+      this.variablesGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.variablesGroupBox.Name = "variablesGroupBox";
+      this.variablesGroupBox.Size = new System.Drawing.Size(172, 178);
+      this.variablesGroupBox.TabIndex = 1;
+      this.variablesGroupBox.TabStop = false;
+      this.variablesGroupBox.Text = "Variables";
+      // 
+      // orderComboBox
+      // 
+      this.orderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+      this.orderComboBox.FormattingEnabled = true;
+      this.orderComboBox.Location = new System.Drawing.Point(51, 144);
+      this.orderComboBox.Name = "orderComboBox";
+      this.orderComboBox.Size = new System.Drawing.Size(115, 21);
+      this.orderComboBox.TabIndex = 6;
+      this.orderComboBox.SelectedIndexChanged += new System.EventHandler(this.orderComboBox_SelectedIndexChanged);
+      // 
+      // legendOrderLabel
+      // 
+      this.legendOrderLabel.AutoSize = true;
+      this.legendOrderLabel.Location = new System.Drawing.Point(6, 149);
+      this.legendOrderLabel.Name = "legendOrderLabel";
+      this.legendOrderLabel.Size = new System.Drawing.Size(36, 13);
+      this.legendOrderLabel.TabIndex = 5;
+      this.legendOrderLabel.Text = "Order:";
+      this.legendOrderLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
       // 
       // useGradientCheckBox
@@ -115,34 +140,34 @@
       this.useGradientCheckBox.CheckedChanged += new System.EventHandler(this.useGradientCheckBox_CheckedChanged);
       // 
-      // label3
-      // 
-      this.label3.AutoSize = true;
-      this.label3.Location = new System.Drawing.Point(6, 97);
-      this.label3.Name = "label3";
-      this.label3.Size = new System.Drawing.Size(39, 13);
-      this.label3.TabIndex = 3;
-      this.label3.Text = "Group:";
-      // 
-      // label2
-      // 
-      this.label2.AutoSize = true;
-      this.label2.Location = new System.Drawing.Point(6, 63);
-      this.label2.Name = "label2";
-      this.label2.Size = new System.Drawing.Size(17, 13);
-      this.label2.TabIndex = 3;
-      this.label2.Text = "Y:";
-      // 
-      // label1
-      // 
-      this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(6, 29);
-      this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(17, 13);
-      this.label1.TabIndex = 2;
-      this.label1.Text = "X:";
+      // groupLabel
+      // 
+      this.groupLabel.AutoSize = true;
+      this.groupLabel.Location = new System.Drawing.Point(6, 97);
+      this.groupLabel.Name = "groupLabel";
+      this.groupLabel.Size = new System.Drawing.Size(39, 13);
+      this.groupLabel.TabIndex = 3;
+      this.groupLabel.Text = "Group:";
+      // 
+      // yLabel
+      // 
+      this.yLabel.AutoSize = true;
+      this.yLabel.Location = new System.Drawing.Point(6, 63);
+      this.yLabel.Name = "yLabel";
+      this.yLabel.Size = new System.Drawing.Size(17, 13);
+      this.yLabel.TabIndex = 3;
+      this.yLabel.Text = "Y:";
+      // 
+      // xLabel
+      // 
+      this.xLabel.AutoSize = true;
+      this.xLabel.Location = new System.Drawing.Point(6, 29);
+      this.xLabel.Name = "xLabel";
+      this.xLabel.Size = new System.Drawing.Size(17, 13);
+      this.xLabel.TabIndex = 2;
+      this.xLabel.Text = "X:";
       // 
       // comboBoxGroup
       // 
-      this.comboBoxGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+      this.comboBoxGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
       this.comboBoxGroup.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
@@ -159,5 +184,5 @@
       // comboBoxYVariable
       // 
-      this.comboBoxYVariable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+      this.comboBoxYVariable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
       this.comboBoxYVariable.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
@@ -173,5 +198,5 @@
       // comboBoxXVariable
       // 
-      this.comboBoxXVariable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+      this.comboBoxXVariable.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
       this.comboBoxXVariable.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
@@ -190,7 +215,7 @@
       this.regressionGroupBox.Controls.Add(this.polynomialRegressionOrderNumericUpDown);
       this.regressionGroupBox.Controls.Add(this.orderLabel);
-      this.regressionGroupBox.Controls.Add(this.label4);
+      this.regressionGroupBox.Controls.Add(this.regressionTypeLabel);
       this.regressionGroupBox.Dock = System.Windows.Forms.DockStyle.Top;
-      this.regressionGroupBox.Location = new System.Drawing.Point(0, 150);
+      this.regressionGroupBox.Location = new System.Drawing.Point(0, 178);
       this.regressionGroupBox.Name = "regressionGroupBox";
       this.regressionGroupBox.Size = new System.Drawing.Size(172, 78);
@@ -201,5 +226,5 @@
       // regressionTypeComboBox
       // 
-      this.regressionTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+      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;
@@ -213,5 +238,5 @@
       // polynomialRegressionOrderNumericUpDown
       // 
-      this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+      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);
@@ -246,32 +271,32 @@
       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.scatterPlotView);
-      this.splitContainer1.Panel2.Controls.Add(this.gradientPanel);
-      this.splitContainer1.Size = new System.Drawing.Size(863, 517);
-      this.splitContainer1.SplitterDistance = 172;
-      this.splitContainer1.TabIndex = 5;
+      // regressionTypeLabel
+      // 
+      this.regressionTypeLabel.AutoSize = true;
+      this.regressionTypeLabel.Location = new System.Drawing.Point(6, 22);
+      this.regressionTypeLabel.Name = "regressionTypeLabel";
+      this.regressionTypeLabel.Size = new System.Drawing.Size(34, 13);
+      this.regressionTypeLabel.TabIndex = 13;
+      this.regressionTypeLabel.Text = "Type:";
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.regressionGroupBox);
+      this.splitContainer.Panel1.Controls.Add(this.variablesGroupBox);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.scatterPlotView);
+      this.splitContainer.Panel2.Controls.Add(this.gradientPanel);
+      this.splitContainer.Size = new System.Drawing.Size(863, 517);
+      this.splitContainer.SplitterDistance = 172;
+      this.splitContainer.TabIndex = 5;
       // 
       // gradientPanel
@@ -288,5 +313,5 @@
       // gradientPictureBox
       // 
-      this.gradientPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+      this.gradientPictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
       this.gradientPictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -325,16 +350,16 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.splitContainer1);
+      this.Controls.Add(this.splitContainer);
       this.Name = "ScatterPlotSingleView";
       this.Size = new System.Drawing.Size(863, 517);
-      this.groupBox1.ResumeLayout(false);
-      this.groupBox1.PerformLayout();
+      this.variablesGroupBox.ResumeLayout(false);
+      this.variablesGroupBox.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.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
       this.gradientPanel.ResumeLayout(false);
       ((System.ComponentModel.ISupportInitialize)(this.gradientPictureBox)).EndInit();
@@ -346,17 +371,17 @@
 
     private HeuristicLab.Analysis.Views.ScatterPlotView scatterPlotView;
-    private System.Windows.Forms.GroupBox groupBox1;
-    private System.Windows.Forms.Label label2;
-    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.GroupBox variablesGroupBox;
+    private System.Windows.Forms.Label yLabel;
+    private System.Windows.Forms.Label xLabel;
     private System.Windows.Forms.ComboBox comboBoxYVariable;
     private System.Windows.Forms.ComboBox comboBoxXVariable;
     private System.Windows.Forms.ComboBox comboBoxGroup;
-    private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.Label groupLabel;
     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;
+    private System.Windows.Forms.Label regressionTypeLabel;
+    private System.Windows.Forms.SplitContainer splitContainer;
     private System.Windows.Forms.CheckBox useGradientCheckBox;
     private System.Windows.Forms.Panel gradientPanel;
@@ -364,4 +389,6 @@
     private System.Windows.Forms.Label gradientMaximumLabel;
     private System.Windows.Forms.PictureBox gradientPictureBox;
+    private System.Windows.Forms.Label legendOrderLabel;
+    private System.Windows.Forms.ComboBox orderComboBox;
   }
 }
Index: branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
===================================================================
--- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs	(revision 14983)
+++ branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs	(revision 14993)
@@ -48,4 +48,6 @@
       regressionTypeComboBox.DataSource = Enum.GetValues(typeof(RegressionType));
       regressionTypeComboBox.SelectedItem = RegressionType.None;
+      orderComboBox.DataSource = Enum.GetValues(typeof(PreprocessingChartContent.LegendOrder));
+      orderComboBox.SelectedItem = PreprocessingChartContent.LegendOrder.Appearance;
     }
 
@@ -73,5 +75,5 @@
       comboBoxYVariable.Items.AddRange(variables.ToArray());
       comboBoxGroup.Items.Add(NoGroupItem);
-      foreach (string var in PreprocessingChartContent.GetVariableNamesForGrouping(Content.PreprocessingData)) {
+      foreach (string var in Content.PreprocessingData.VariableNames) {
         comboBoxGroup.Items.Add(var);
       }
@@ -98,6 +100,7 @@
         var yVariable = (string)comboBoxYVariable.SelectedItem;
         var groupVariable = (string)comboBoxGroup.SelectedItem;
-
-        ScatterPlot scatterPlot = ScatterPlotContent.CreateScatterPlot(Content.PreprocessingData, xVariable, yVariable, groupVariable);
+        var legendOrder = (PreprocessingChartContent.LegendOrder)orderComboBox.SelectedItem;
+
+        ScatterPlot scatterPlot = ScatterPlotContent.CreateScatterPlot(Content.PreprocessingData, xVariable, yVariable, groupVariable, legendOrder);
         //rows are saved and removed to avoid firing of visual property changed events
         var rows = scatterPlot.Rows.ToList();
@@ -237,4 +240,8 @@
       return colors[index];
     }
+
+    private void orderComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      UpdateScatterPlot();
+    }
   }
 }
