[GRASS-SVN] r69196 - grass/branches/releasebranch_7_0/display/d.histogram
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 21 13:35:46 PDT 2016
Author: annakrat
Date: 2016-08-21 13:35:46 -0700 (Sun, 21 Aug 2016)
New Revision: 69196
Modified:
grass/branches/releasebranch_7_0/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_0/display/d.histogram/bar.c
===================================================================
--- grass/branches/releasebranch_7_0/display/d.histogram/bar.c 2016-08-21 20:28:38 UTC (rev 69195)
+++ grass/branches/releasebranch_7_0/display/d.histogram/bar.c 2016-08-21 20:35:46 UTC (rev 69196)
@@ -307,7 +307,8 @@
if (nodata && i == dist_stats->mincat)
sprintf(txt, "null");
else if (is_fp) {
- if ((range_dmax - range_dmin) <= 1.0)
+ dmin = range_dmin + i * (range_dmax - range_dmin) / nsteps;
+ 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