From 9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c Mon Sep 17 00:00:00 2001 From: William Joye Date: Fri, 21 Sep 2018 15:44:21 -0400 Subject: Axis tick labels: zero out any extremely small numbers --- generic/tkbltGrAxis.C | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generic/tkbltGrAxis.C b/generic/tkbltGrAxis.C index 8532600..418abbb 100644 --- a/generic/tkbltGrAxis.C +++ b/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 =0; + if (ops->tickFormat && *ops->tickFormat) { snprintf(string, TICK_LABEL_SIZE, ops->tickFormat, value); } else if (ops->logScale) { -- cgit v0.12