Subject: d.histogram omits the last bar
Platform: Linux/Intel
Linux distro:: RedHat
linux cpu:: Intel (i486, i586, pentium ...)
Xwindows version:: Xfree 4.0.x
Xwindows manager:: fvwm2
TclTk version:: tcl/tk 8.0.5
grass downloaded at:: CVS Server, Germany
grass binary for platform:: I compiled the sources myself
grass sources source:: yes, I am using the latest GRASS from CVS
c compiler name:: gcc
d.histogram omits the last bar (unless "-n" is given)
The following patch fixes it:
Index: src/display/d.histogram/cmd/bar.c
===================================================================
RCS file: /home/grass/grassrepository/grass/src/display/d.histogram/cmd/bar.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bar.c
--- src/display/d.histogram/cmd/bar.c 1999/12/29 15:10:06 1.1.1.1
+++ src/display/d.histogram/cmd/bar.c 2001/03/24 23:49:46
@@ -147,8 +147,7 @@
*
*/
ptr = dist_stats->ptr;
- if(nodata) dist_stats->maxcat++;
- for (i=dist_stats->mincat; i<dist_stats->maxcat; i++)
+ for (i=dist_stats->mincat; i<=dist_stats->maxcat; i++)
{
draw=NO;
/* figure bar color and height
|
|