Index: /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/InfixExpressionFormatter.cs
===================================================================
--- /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/InfixExpressionFormatter.cs	(revision 17789)
+++ /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/InfixExpressionFormatter.cs	(revision 17790)
@@ -29,4 +29,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using Microsoft.SqlServer.Server;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
@@ -83,92 +84,76 @@
           if (!varNode.Weight.IsAlmost(1.0)) {
             strBuilder.Append("(");
-            if (constants != null) {
-              strBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}", varNode.Weight);
-            } else {
-              strBuilder.Append(varNode.Weight.ToString(formatString, numberFormat));
-            }
+            AppendConstant(strBuilder, constants, varNode.Weight, formatString, numberFormat);
             strBuilder.Append("*");
           }
 
           strBuilder.Append("LAG(");
-          if (varNode.VariableName.Contains("'"))
-            strBuilder.AppendFormat("\"{0}\"", varNode.VariableName);
-          else
-            strBuilder.AppendFormat("'{0}'", varNode.VariableName);
-
+          AppendVariableName(strBuilder, varNode.VariableName);
           strBuilder.Append(", ")
                     .AppendFormat(numberFormat, "{0}", varNode.Lag)
                     .Append(")");
+          if (!varNode.Weight.IsAlmost(1.0)) strBuilder.Append(")");
         } else if (node.Symbol is Variable) {
           var varNode = node as VariableTreeNode;
           if (!varNode.Weight.IsAlmost(1.0)) {
             strBuilder.Append("(");
-            if (constants != null) {
-              string constantKey = $"c_{constants.Count}";
-              strBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}", constantKey);
-              constants.Add(new KeyValuePair<string, double>(constantKey, varNode.Weight));
-            } else {
-              strBuilder.Append(varNode.Weight.ToString(formatString, numberFormat));
-            }
-
+            AppendConstant(strBuilder, constants, varNode.Weight, formatString, numberFormat);
             strBuilder.Append("*");
           }
 
-          if (varNode.VariableName.Contains("'"))
-            strBuilder.AppendFormat("\"{0}\"", varNode.VariableName);
-          else
-            strBuilder.AppendFormat("'{0}'", varNode.VariableName);
+          AppendVariableName(strBuilder, varNode.VariableName);
 
           if (!varNode.Weight.IsAlmost(1.0)) strBuilder.Append(")");
         } else if (node.Symbol is FactorVariable) {
           var factorNode = node as FactorVariableTreeNode;
-          if (factorNode.VariableName.Contains("'"))
-            strBuilder.AppendFormat("\"{0}\"", factorNode.VariableName);
-          else
-            strBuilder.AppendFormat("'{0}'", factorNode.VariableName);
-
-          strBuilder.AppendFormat("[{0}]",
-            string.Join(", ", factorNode.Weights.Select(w => w.ToString(formatString, numberFormat))));
+          AppendVariableName(strBuilder, factorNode.VariableName);
+
+          strBuilder.Append("[");
+          for (int i = 0; i < factorNode.Weights.Length; i++) {
+            if (i > 0) strBuilder.Append(", ");
+            AppendConstant(strBuilder, constants, factorNode.Weights[i], formatString, numberFormat);
+          }
+          strBuilder.Append("]");
         } else if (node.Symbol is BinaryFactorVariable) {
           var factorNode = node as BinaryFactorVariableTreeNode;
           if (!factorNode.Weight.IsAlmost(1.0)) {
             strBuilder.Append("(");
-            if (constants != null) {
-              strBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}", factorNode.Weight);
-            } else {
-              strBuilder.Append(factorNode.Weight.ToString(formatString, numberFormat));
-            }
+            AppendConstant(strBuilder, constants, factorNode.Weight, formatString, numberFormat);
 
             strBuilder.Append("*");
           }
 
-          if (factorNode.VariableName.Contains("'"))
-            strBuilder.AppendFormat("\"{0}\"", factorNode.VariableName);
-          else
-            strBuilder.AppendFormat("'{0}'", factorNode.VariableName);
-
+          AppendVariableName(strBuilder, factorNode.VariableName);
           strBuilder.Append(" = ");
-          if (factorNode.VariableValue.Contains("'"))
-            strBuilder.AppendFormat("\"{0}\"", factorNode.VariableValue);
-          else
-            strBuilder.AppendFormat("'{0}'", factorNode.VariableValue);
+          AppendVariableName(strBuilder, factorNode.VariableValue);
 
           if (!factorNode.Weight.IsAlmost(1.0)) strBuilder.Append(")");
         } else if (node.Symbol is Constant) {
           var constNode = node as ConstantTreeNode;
-          if (constants != null) {
-            string constantKey = $"c_{constants.Count}";
-
-            strBuilder.AppendFormat(CultureInfo.InvariantCulture, constantKey);
-            constants.Add(new KeyValuePair<string, double>(constantKey, constNode.Value));
+          if(constants==null && constNode.Value < 0) {
+            strBuilder.Append("(").Append(constNode.Value.ToString(formatString, numberFormat))
+                      .Append(")"); // (-1
           } else {
-            if (constNode.Value >= 0.0)
-              strBuilder.Append(constNode.Value.ToString(formatString, numberFormat));
-            else
-              strBuilder.Append("(").Append(constNode.Value.ToString(formatString, numberFormat))
-                        .Append(")"); // (-1
+            AppendConstant(strBuilder, constants, constNode.Value, formatString, numberFormat);
           }
         }
       }
+    }
+
+    private static void AppendConstant(StringBuilder strBuilder, List<KeyValuePair<string, double>> constants, double value, string formatString, NumberFormatInfo numberFormat) {
+      if (constants != null) {
+        string constantKey = $"c_{constants.Count}";
+        strBuilder.AppendFormat(CultureInfo.InvariantCulture, "{0}", constantKey);
+        constants.Add(new KeyValuePair<string, double>(constantKey, value));
+      } else {
+        strBuilder.Append(value.ToString(formatString, numberFormat));
+      }
+    }
+
+    private static void AppendVariableName(StringBuilder strBuilder, string name) {
+      if (name.Contains("'"))
+        strBuilder.AppendFormat("\"{0}\"", name);
+      else
+        strBuilder.AppendFormat("'{0}'", name);
     }
 
Index: /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
===================================================================
--- /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs	(revision 17789)
+++ /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs	(revision 17790)
@@ -154,5 +154,5 @@
           strBuilder.Append(" / Math.Sqrt(1 + Math.Pow(");
           FormatRecursively(node.GetSubtree(1), strBuilder);
-          strBuilder.Append(" , 2) )");
+          strBuilder.Append(" , 2) ) )");
         } else {
           throw new NotSupportedException("Formatting of symbol: " + node.Symbol + " not supported for C# symbolic expression tree formatter.");
Index: /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs
===================================================================
--- /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs	(revision 17789)
+++ /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionLatexFormatter.cs	(revision 17790)
@@ -517,5 +517,5 @@
 
     private void FormatStartSymbol(StringBuilder strBuilder) {
-      strBuilder.Append(targetVariable ?? "target_" + (targetCount++));
+      strBuilder.Append(EscapeLatexString(targetVariable) ?? "target_{" + targetCount++ + "}");
       if (containsTimeSeriesSymbol)
         strBuilder.Append("(t)");
Index: /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/PartialDependencePlot.cs
===================================================================
--- /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/PartialDependencePlot.cs	(revision 17789)
+++ /branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Views/3.4/Controls/PartialDependencePlot.cs	(revision 17790)
@@ -646,7 +646,8 @@
 
     private void sharedFixedVariables_Reset(object sender, EventArgs e) {
+      RecalculateInternalDataset();
       var newValue = sharedFixedVariables.GetDoubleValue(FreeVariable, 0);
       VerticalLineAnnotation.X = newValue;
-      UpdateCursor(); // triggers update of InternalDataset
+      UpdateCursor();
     }
 
