Details Ticket 228


Comment | Reply | Take | Open


Serial Number 228
Subject d.histogram omits the last bar
Area bug
Queue grass
Requestors glynn@sensei.co.uk
Owner none
Status resolved
Last User Contact Wed Apr 4 18:05:17 2001 (7 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Wed Apr 4 18:05:26 2001 (7 yr ago)
Created Sun Mar 25 01:03:22 2001 (7 yr ago)

Transaction History Ticket 228


Sun, Mar 25 2001 01:03:22    Request created by guest  
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 
Wed, Apr 4 2001 18:05:17    Mail sent by mneteler  
Thanks for the fix, Glenn!

I have applied it to CVS.

Kind regards

 Markus Neteler
Wed, Apr 4 2001 18:05:26    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request