[GRASS-SVN] r69195 - grass/branches/releasebranch_7_2/display/d.histogram
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 21 13:28:38 PDT 2016
Author: annakrat
Date: 2016-08-21 13:28:38 -0700 (Sun, 21 Aug 2016)
New Revision: 69195
Modified:
grass/branches/releasebranch_7_2/display/d.histogram/bar.c
Log:
d.histogram: fix x axis labels for small numbers, see #2463 (merge from trunk, r68953)
Modified: grass/branches/releasebranch_7_2/display/d.histogram/bar.c
===================================================================
--- grass/branches/releasebranch_7_2/display/d.histogram/bar.c 2016-08-21 20:25:58 UTC (rev 69194)
+++ grass/branches/releasebranch_7_2/display/d.histogram/bar.c 2016-08-21 20:28:38 UTC (rev 69195)
@@ -308,7 +308,7 @@
sprintf(txt, "null");
else if (is_fp) {
dmin = range_dmin + i * (range_dmax - range_dmin) / nsteps;
- if ((range_dmax - range_dmin) <= 1.0)
+ if ((tic_every * (range_dmax - range_dmin) / nsteps) < 1.0)
sprintf(txt, "%.2f", dmin / (double)tic_unit);
else
sprintf(txt, "%d", (int)(dmin / (double)tic_unit));
More information about the grass-commit
mailing list