[GRASS-SVN] r68953 - grass/trunk/display/d.histogram
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 14 01:52:07 PDT 2016
Author: annakrat
Date: 2016-07-14 01:52:07 -0700 (Thu, 14 Jul 2016)
New Revision: 68953
Modified:
grass/trunk/display/d.histogram/bar.c
Log:
d.histogram: fix x axis labels for small numbers, see #2463
Modified: grass/trunk/display/d.histogram/bar.c
===================================================================
--- grass/trunk/display/d.histogram/bar.c 2016-07-13 20:47:26 UTC (rev 68952)
+++ grass/trunk/display/d.histogram/bar.c 2016-07-14 08:52:07 UTC (rev 68953)
@@ -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