diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-09-21 19:44:21 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-09-21 19:44:21 (GMT) |
commit | 9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c (patch) | |
tree | 278a819ad72c9a5885f59651e2e1d6de34f2b7bd | |
parent | 102cc58b734175657d3112ccf51f6159bfd04518 (diff) | |
download | blt-9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c.zip blt-9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c.tar.gz blt-9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c.tar.bz2 |
Axis tick labels: zero out any extremely small numbersv3.2.11
-rw-r--r-- | generic/tkbltGrAxis.C | 4 |
1 files changed, 4 insertions, 0 deletions
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>-DBL_EPSILON) + value =0; + if (ops->tickFormat && *ops->tickFormat) { snprintf(string, TICK_LABEL_SIZE, ops->tickFormat, value); } else if (ops->logScale) { |