summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-09-21 19:47:09 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-09-21 19:47:09 (GMT)
commitd3a2313e054697eddd9b4c0c47cfe19459f98e05 (patch)
tree56ba6f09ce9e0b86f35ec83855c9c66ad47678d8
parent2f48832b1c6aa5a77142d8052924e7c0d169cd34 (diff)
parentffb13467623ff90bffa5a46389868904a5175a28 (diff)
downloadblt-d3a2313e054697eddd9b4c0c47cfe19459f98e05.zip
blt-d3a2313e054697eddd9b4c0c47cfe19459f98e05.tar.gz
blt-d3a2313e054697eddd9b4c0c47cfe19459f98e05.tar.bz2
Merge commit 'ffb13467623ff90bffa5a46389868904a5175a28'
-rw-r--r--tkblt/generic/tkbltGrAxis.C4
1 files changed, 4 insertions, 0 deletions
diff --git a/tkblt/generic/tkbltGrAxis.C b/tkblt/generic/tkbltGrAxis.C
index 8532600..418abbb 100644
--- a/tkblt/generic/tkbltGrAxis.C
+++ b/tkblt/generic/tkbltGrAxis.C
@@ -1049,6 +1049,10 @@ TickLabel* Axis::makeLabel(double value)
char string[TICK_LABEL_SIZE + 1];
+ // zero out any extremely small numbers
+ if (value<DBL_EPSILON && value>-DBL_EPSILON)
+ value =0;
+
if (ops->tickFormat && *ops->tickFormat) {
snprintf(string, TICK_LABEL_SIZE, ops->tickFormat, value);
} else if (ops->logScale) {