File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
app/rtplot/src/main/java/org/csstudio/javafx/rtplot/internal Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 11/*******************************************************************************
2- * Copyright (c) 2014-2020 Oak Ridge National Laboratory.
2+ * Copyright (c) 2014-2023 Oak Ridge National Laboratory.
33 * All rights reserved. This program and the accompanying materials
44 * are made available under the terms of the Eclipse Public License v1.0
55 * which accompanies this distribution, and is available at
@@ -441,8 +441,16 @@ public void autoscale()
441441 if (low == high )
442442 { // Center trace with constant value (empty range)
443443 final double half = Math .abs (low /2 );
444- low -= half ;
445- high += half ;
444+ if (half > 0 )
445+ {
446+ low -= half ;
447+ high += half ;
448+ }
449+ else
450+ { // low = high = half = 0, default to [-1, 1]
451+ low = -1.0 ;
452+ high = 1.0 ;
453+ }
446454 }
447455 if (axis .isLogarithmic ())
448456 { // Perform adjustment in log space.
You can’t perform that action at this time.
0 commit comments