JAL-4023 use %g for distances (scientific notation for very small or large values)
[jalview.git] / src / jalview / gui / TreeCanvas.java
index 0012888..6f143db 100755 (executable)
@@ -259,7 +259,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
       if (showDistances && (node.dist > 0))
       {
-        nodeLabel = new Format("%-.2f").form(node.dist);
+        nodeLabel = new Format("%g").form(node.dist);
       }
 
       if (showBootstrap && node.bootstrap > -1)
@@ -347,7 +347,7 @@ public class TreeCanvas extends JPanel implements MouseListener, Runnable,
 
       if (showDistances && (node.dist > 0))
       {
-        nodeLabel = new Format("%-.2f").form(node.dist);
+        nodeLabel = new Format("%g").form(node.dist);
       }
 
       if (showBootstrap && node.bootstrap > -1)