Index: /trunk/sources/HeuristicLab.CEDMA.Charting/Histogram.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/Histogram.cs	(revision 574)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/Histogram.cs	(revision 575)
@@ -32,4 +32,8 @@
     private static readonly Color defaultColor = Color.Blue;
     private static readonly Color selectionColor = Color.Red;
+    private static readonly Pen defaultPen = new Pen(defaultColor);
+    private static readonly Brush defaultBrush = defaultPen.Brush;
+    private static readonly Pen selectionPen = new Pen(selectionColor);
+    private static readonly Brush selectionBrush = selectionPen.Brush;
 
     private double minX;
@@ -43,6 +47,4 @@
     private Dictionary<Record, IPrimitive> recordToPrimitiveDictionary;
     private Group bars;
-    private double[] limits;
-    private int[] buckets;
     private string dimension;
 
@@ -62,9 +64,8 @@
       results.OnRecordAdded += new EventHandler<RecordAddedEventArgs>(results_OnRecordAdded);
       results.Changed += new EventHandler(results_Changed);
-      limits = new double[N_BUCKETS - 1];
-      buckets = new int[N_BUCKETS];
     }
 
     void results_Changed(object sender, EventArgs e) {
+      ResetViewSize();
       Repaint();
       EnforceUpdate();
@@ -96,10 +97,5 @@
         Group.Add(new Axis(this, 0, 0, AxisType.Both));
         UpdateViewSize(0, 0);
-        Pen defaultPen = new Pen(defaultColor);
-        Brush defaultBrush = defaultPen.Brush;
-        PaintHistogram(records, defaultPen, defaultBrush);
-        Pen selectionPen = new Pen(selectionColor);
-        Brush selectionBrush = selectionPen.Brush;
-        PaintHistogram(records.Where(r => r.Selected), selectionPen, selectionBrush);
+        PaintHistogram(records);
         Group.Add(bars);
         UpdateEnabled = true;
@@ -107,5 +103,5 @@
     }
 
-    private void PaintHistogram(IEnumerable<Record> records, Pen pen, Brush brush) {
+    private void PaintHistogram(IEnumerable<Record> records) {
       var values = records.Select(r => new { Record = r, Value = r.Get(dimension) }).Where(
         x => !double.IsNaN(x.Value) && !double.IsInfinity(x.Value) && x.Value != double.MinValue && x.Value != double.MaxValue).OrderBy(x => x.Value);
@@ -121,13 +117,25 @@
       foreach(var g in frequencies) {
         double freq = g.Count();
+        double selectedFreq = g.Where(r=>r.Record.Selected).Count();
         double lower = g.Key;
         double upper = g.Key + bucketSize;
-        HeuristicLab.Charting.Rectangle bar = new HeuristicLab.Charting.Rectangle(this, lower, 0, upper, freq, pen, brush);
+        HeuristicLab.Charting.Rectangle bar = new HeuristicLab.Charting.Rectangle(this, lower, 0, upper, freq, defaultPen, defaultBrush);
         primitiveToRecordsDictionary[bar] = g.Select(r => r.Record).ToList();
         primitiveToRecordsDictionary[bar].ForEach(x => recordToPrimitiveDictionary[x] = bar);
-        if(lower == frequencies.First().Key) bar.ToolTipText = " x < " + upper + " : " + freq;
-        else if(lower == frequencies.Last().Key) bar.ToolTipText = "x >= " + lower + " : " + freq;
-        else bar.ToolTipText = "x in [" + lower + " .. " + upper + "[ : " + freq;
+        HeuristicLab.Charting.Rectangle selectedBar = new HeuristicLab.Charting.Rectangle(this, lower, 0, upper, selectedFreq, selectionPen, selectionBrush);
+        primitiveToRecordsDictionary[selectedBar] = g.Select(r => r.Record).Where(r=>r.Selected).ToList();
+        primitiveToRecordsDictionary[selectedBar].ForEach(x => recordToPrimitiveDictionary[x] = bar);
+        if(lower == frequencies.First().Key) {
+          selectedBar.ToolTipText = " x < " + upper + " : " + selectedFreq;
+           bar.ToolTipText = " x < " + upper + " : " + freq;
+        } else if(lower == frequencies.Last().Key) {
+          selectedBar.ToolTipText = "x >= " + lower + " : " + selectedFreq;
+          bar.ToolTipText = "x >= " + lower + " : " + freq;
+        } else {
+          selectedBar.ToolTipText = "x in [" + lower + " .. " + upper + "[ : " + selectedFreq;
+           bar.ToolTipText = "x in [" + lower + " .. " + upper + "[ : " + freq;
+        }
         bars.Add(bar);
+        bars.Add(selectedBar);
         UpdateViewSize(lower, freq);
         UpdateViewSize(upper, freq);
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/Record.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/Record.cs	(revision 574)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/Record.cs	(revision 575)
@@ -64,4 +64,5 @@
     public const string TREE_SIZE = "Tree size";
     public const string TREE_HEIGHT = "Tree height";
+    public const string SELECTIONPRESSURE = "Selection pressure";
 
     public const string X_JITTER = "__X_JITTER";
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/ResultList.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/ResultList.cs	(revision 574)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/ResultList.cs	(revision 575)
@@ -60,6 +60,7 @@
     private readonly Entity treeSizePredicate = new Entity(cedmaNS + "TreeSize");
     private readonly Entity treeHeightPredicate = new Entity(cedmaNS + "TreeHeight");
-    private readonly Entity rawDataPredicate = new Entity(cedmaNS + "rawData");
-    private readonly Entity hasModelPredicate = new Entity(cedmaNS + "hasModel");
+    private readonly Entity selectionPressurePredicate = new Entity(cedmaNS + "SelectionPressure");
+    private readonly Entity rawDataPredicate = new Entity(cedmaNS + "RawData");
+    private readonly Entity hasModelPredicate = new Entity(cedmaNS + "Model");
     private readonly Entity anyEntity = new Entity(null);
     private Dictionary<Record, Dataset> datasets;
@@ -75,5 +76,5 @@
     }
 
-    private List<string> variableNames = new List<string>() { Record.TARGET_VARIABLE, Record.TREE_SIZE, Record.TREE_HEIGHT,
+    private List<string> variableNames = new List<string>() { Record.TARGET_VARIABLE, Record.TREE_SIZE, Record.TREE_HEIGHT, Record.SELECTIONPRESSURE,
     Record.MAPE_TRAINING, Record.MAPE_VALIDATION, Record.MAPE_TEST,
     Record.R2_TRAINING, Record.R2_VALIDATION, Record.R2_TEST};
@@ -102,5 +103,5 @@
       .Select(x => store.Select(new SelectFilter(
         new Entity[] { new Entity(x.Subject.Uri) },
-        new Entity[] { targetVariablePredicate, treeSizePredicate, treeHeightPredicate,
+        new Entity[] { targetVariablePredicate, treeSizePredicate, treeHeightPredicate, selectionPressurePredicate,
           trainingMAPEPredicate, validationMAPEPredicate, testMAPEPredicate,
           trainingR2Predicate, validationR2Predicate, testR2Predicate },
@@ -145,4 +146,5 @@
       predicateToVariableName[treeSizePredicate] = Record.TREE_SIZE;
       predicateToVariableName[treeHeightPredicate] = Record.TREE_HEIGHT;
+      predicateToVariableName[selectionPressurePredicate] = Record.SELECTIONPRESSURE;
       predicateToVariableName[trainingMAPEPredicate] = Record.MAPE_TRAINING;
       predicateToVariableName[validationMAPEPredicate] = Record.MAPE_VALIDATION;
