Index: branches/OaaS/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs
===================================================================
--- branches/OaaS/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs	(revision 8228)
+++ branches/OaaS/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs	(revision 9363)
@@ -65,4 +65,5 @@
 
       this.chart.ChartAreas[0].AxisY.Title = "Estimated Values";
+      this.chart.ChartAreas[0].AxisY.IsStartedFromZero = false;
       this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
       this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
@@ -169,4 +170,9 @@
       chart.Annotations.Clear();
       int classIndex = 1;
+      IClassificationProblemData problemData = Content.ProblemData;
+      var classValues = Content.Model.ClassValues.ToArray();
+      Axis y = chart.ChartAreas[0].AxisY;
+      Axis x = chart.ChartAreas[0].AxisX;
+      string name;
       foreach (double threshold in Content.Model.Thresholds) {
         if (!double.IsInfinity(threshold)) {
@@ -176,17 +182,55 @@
           annotation.LineWidth = 2;
           annotation.LineColor = Color.Red;
-
           annotation.IsInfinitive = true;
           annotation.ClipToChartArea = chart.ChartAreas[0].Name;
           annotation.Tag = classIndex;  //save classIndex as Tag to avoid moving the threshold accross class bounderies
-
           annotation.AxisX = chart.ChartAreas[0].AxisX;
-          annotation.AxisY = chart.ChartAreas[0].AxisY;
+          annotation.AxisY = y;
           annotation.Y = threshold;
 
+          name = problemData.GetClassName(classValues[classIndex - 1]);
+          TextAnnotation beneathLeft = CreateTextAnnotation(name, classIndex, x, y, x.Minimum, threshold, ContentAlignment.TopLeft);
+          TextAnnotation beneathRight = CreateTextAnnotation(name, classIndex, x, y, x.Maximum, threshold, ContentAlignment.TopRight);
+
+          name = problemData.GetClassName(classValues[classIndex]);
+          TextAnnotation aboveLeft = CreateTextAnnotation(name, classIndex, x, y, x.Minimum, threshold, ContentAlignment.BottomLeft);
+          TextAnnotation aboveRight = CreateTextAnnotation(name, classIndex, x, y, x.Maximum, threshold, ContentAlignment.BottomRight);
+
           chart.Annotations.Add(annotation);
+          chart.Annotations.Add(beneathLeft);
+          chart.Annotations.Add(aboveLeft);
+          chart.Annotations.Add(beneathRight);
+          chart.Annotations.Add(aboveRight);
+
+          beneathLeft.ResizeToContent();
+          beneathRight.ResizeToContent();
+          aboveLeft.ResizeToContent();
+          aboveRight.ResizeToContent();
+
+          beneathRight.Width = -beneathRight.Width;
+          aboveLeft.Height = -aboveLeft.Height;
+          aboveRight.Height = -aboveRight.Height;
+          aboveRight.Width = -aboveRight.Width;
+
           classIndex++;
         }
       }
+    }
+
+    private TextAnnotation CreateTextAnnotation(string name, int classIndex, Axis axisX, Axis axisY, double x, double y, ContentAlignment alignment) {
+      TextAnnotation annotation = new TextAnnotation();
+      annotation.Text = name;
+      annotation.AllowMoving = true;
+      annotation.AllowResizing = false;
+      annotation.AllowSelecting = false;
+      annotation.IsSizeAlwaysRelative = true;
+      annotation.ClipToChartArea = chart.ChartAreas[0].Name;
+      annotation.Tag = classIndex;
+      annotation.AxisX = axisX;
+      annotation.AxisY = axisY;
+      annotation.Alignment = alignment;
+      annotation.X = x;
+      annotation.Y = y;
+      return annotation;
     }
 
@@ -238,4 +282,5 @@
       double[] thresholds = Content.Model.Thresholds.ToArray();
       thresholds[classIndex] = e.NewLocationY;
+      Array.Sort(thresholds);
       Content.Model.SetThresholdsAndClassValues(thresholds, Content.Model.ClassValues);
     }
