Details Ticket 1977


Comment | Reply | Take | Resolve


Serial Number 1977
Subject d.histogram produces illegible axes labels
Area grass6
Queue grass
Requestors dfinlays@u.washington.edu
Owner none
Status open
Last User Contact Thu May 17 08:32:31 2007 (1 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu May 17 08:32:31 2007 (1 yr ago)
Created Tue Jul 1 06:57:40 2003 (5 yr ago)

Transaction History Ticket 1977


Tue, Jul 1 2003 06:57:40    Request created by guest  
Subject: d.histogram produces illegible axes labels

Platform: WindowsNT/2000/XP
grass obtained from: Trento Italy site
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: 5.0.2

When using the d.histogram feature on a floating point raster such as elevations,
the resulting axis tic marks and labels are often illegible.

Workaround: Greatly reducing the number of bins (nsteps) in the histogram will
produce resonable axes tic marks.

Axes labels and tic marks should handle large numbers of bins gracefully.
Sat, Nov 4 2006 18:09:21    Mail sent by mneteler  
https://intevation.de/rt/webrt?serial_num=1977

> When using the d.histogram feature on a floating point raster such as
> elevations, the resulting axis tic marks and labels are often illegible.
> 
> Workaround: Greatly reducing the number of bins (nsteps) in the histogram will
> produce resonable axes tic marks.
> 
> Axes labels and tic marks should handle large numbers of bins gracefully.
It would be really good to get the horizontal ticks/labels problem 
fixed. Is there anyone who is willing to take a look? I tried a while
but didn't find a solution (maybe it isn't that hard, though).

Markus
Sat, Nov 4 2006 18:09:53    Area changed to grass6 by mneteler  
Sun, Nov 5 2006 04:40:50    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Sun, 5 Nov 2006 16:40:39 +1300
From Hamish <hamish_nospam@yahoo.com>
To Markus Neteler via RT <grass-bugs@intevation.de>
Cc dfinlays@u.washington.edu, grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #1977] (grass) d.histogram produces illegible axes labels
Message-Id <20061105164039.4ddc34b0.hamish_nospam@yahoo.com>
In-Reply-To <20061104170921.E36E2101F00@lists.intevation.de>
References <20061104170921.E36E2101F00@lists.intevation.de>
X-Mailer Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-2.3 tagged_above=-999 required=3 tests=[BAYES_00=-5, FORGED_YAHOO_RCVD=2.7]
X-Spam-Level
Markus Neteler via RT wrote:
> https://intevation.de/rt/webrt?serial_num=1977
> 
> > When using the d.histogram feature on a floating point raster such
> > as elevations, the resulting axis tic marks and labels are often
> > illegible.
> > 
> > Workaround: Greatly reducing the number of bins (nsteps) in the
> > histogram will produce resonable axes tic marks.
> > 
> > Axes labels and tic marks should handle large numbers of bins
> > gracefully.
> 
> It would be really good to get the horizontal ticks/labels problem 
> fixed. Is there anyone who is willing to take a look? I tried a while
> but didn't find a solution (maybe it isn't that hard, though).


from previous attempt at fixing this bug:

==============================================

From: Hamish
Subject: Re: d.histogram label bug
Date: Wed, 5 Apr 2006 13:01:34 +1200
To: Markus

> you will probably know the attached d.histogram label
> bug (see screenshot).

yes

> It seems to be "just" the density of tics/labels
> which isn't estimated correctly (maybe divide by 10
> or so to make it readable).
> 
> The raster map stats are:
> 
> n: 1116427
> minimum: -23.1376
> maximum: -8.79618
> range: 14.3414
> mean: -16.509
> standard deviation: 2.02468
> variance: 4.09934
> variation coefficient: -12.2641 %
> sum: -18431148.6160733774

AFAICT it only happens with FP maps, and if you stretch the window
larger or smaller it can fix itself.

> I have tried a while but don't really understand
> how it works in bar.c.
> 
> Maybe you could take a few minutes to investigate?

It's a bit complicated...
default for fs maps is to reduce to 255 cats as in r.stats, but the
calculation for tick spacing is using the FP range: conflict of units.
As proof of concept this fixes the ticks (I think, not a proper fix),
but the labels need changing too, as now they won't match up.

bar.c line ~120
//        while((range_dmax - range_dmin)/tics[i].every > max_tics)
	  while ((num_cats/tics[i].every) > max_tics)
	       i++;


but I'm not sure if ticks should line up with the 255 rectangles or line
up with whole numbers of the FP range.

anyway, some why. Maybe I will look into it further once I have my next
batch of models running.


Hamish


Wed, May 16 2007 00:04:35    Mail sent by paul-grass@stjohnspoint.co.uk  
Return-Path <paul-grass@stjohnspoint.co.uk>
Delivered-To grass-bugs@lists.intevation.de
Date Tue, 15 May 2007 23:04:28 +0100 (BST)
From Paul Kelly <paul-grass@stjohnspoint.co.uk>
X-X-Sender paulk@agrippa.ukshells.co.uk
To grass-dev@grass.itc.it
Cc Hamish <hamish_nospam@yahoo.com>, grass-bugs@intevation.de
Subject Re: [GRASS-dev] d.histogram problem [bug #1977]
In-Reply-To <Pine.LNX.4.62.0705151906140.7866@agrippa.ukshells.co.uk>
Message-ID <Pine.LNX.4.62.0705152252390.10148@agrippa.ukshells.co.uk>
References <20070514172522.449d978b.hamish_nospam@yahoo.com> <C26DB00D.22221%michael.barton@asu.edu> <20070515151506.0b8011da.hamish_nospam@yahoo.com> <Pine.LNX.4.62.0705151906140.7866@agrippa.ukshells.co.uk>
MIME-Version 1.0
Content-Type TEXT/PLAIN; charset=US-ASCII; format=flowed
X-SA-Do-Not-Run Yes
X-SA-Exim-Connect-IP 217.10.143.90
X-SA-Exim-Mail-From paul-grass@stjohnspoint.co.uk
X-SA-Exim-Scanned No (on mail.ukshells.net); SAEximRunCond expanded to false
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-5 tagged_above=-999 required=3.5 tests=[BAYES_00=-5]
X-Spam-Score -5
X-Spam-Level
On Tue, 15 May 2007, Paul Kelly wrote:

> On Tue, 15 May 2007, Hamish wrote:
>
>> ok, so bug #1977 still matters. (axes tags somewhat broken for FP maps)
>>  http://intevation.de/rt/webrt?serial_num=1977
>
> I wonder is there a bit more too it that just the axes labelling. E.g. I 
> tried comparing the output of "r.stats -c input=slope nsteps=10" to what 
> d.histogram draws for nsteps=10. r.stats says:
> 0-5.252012 81333
> 5.252012-10.504024 86135
> 10.504024-15.756036 60593
> 15.756036-21.008047 37301
> 21.008047-26.260059 16918
> 26.260059-31.512071 6275
> 31.512071-36.764083 1415
> 36.764083-42.016095 139
> 42.016095-47.268107 13
> 47.268107-52.520119 1
> * 12929
>
> i.e. it seems obvious the first bar should cover the range 0-5.25012 and so
> on (although I think it's fine that the x-axis label shows whole numbers; it
> doesn't need to line up with the bar/bin edges), but in the d.histogram 
> output it seems quite clear that the first bar is drawn between 5 and 10 
> (approximately) on the x-axis.

Actually, to put that another way you could say the numbers on the x-axis 
are in completely the wrong places. To me, it seems the numbers shown 
under the ticks refer to the floor'ed value (i.e. probably a double cast 
to an int) of the maximum value included in the bin to the right of the 
tickmark, if that makes sense. I.e. the numbers are one-off to the left 
of the ticks they represent, but even if shown under the correct tick they 
would still be wrong because they have been truncated to integers.

(Looking at the output of r.stats -c xxx nsteps=xx next to the histogram 
plot is really helpful for understanding this.)

I think the ticks should have no relation to the position of the borders 
between the bars. The left-hand edge of the first bar should start at the 
minimum value of the data and the right hand edge of the last bar should 
end at the maximum value of the data. I think round numbers in between 
should be marked with ticks (spacing worked out somehow from the 
hard-coded maximum 40 bins between numbered ticks).

That's probably easier to fix, than to put a more comprehensive fix in 
that would do the binning within d.histogram rather than relying on 
r.stats to do it all. Such a solution would enable the number of bins for 
integer maps to be specified too. At present this really doesn't seem 
possible without changing the structure of either d.histogram or r.stats.

Paul


>
> Also it seems strange that it doesn't allow you to set the number of bins for
> non-floating point maps.
>
> Also, 255 bins seems not a very good default to me. It is a bit high and the
> result doesn't really look like a histogram.
>
> I'll try and look into it more if I have time. Always remember doing maths
at 
> school and drawing a proper histogram being something that was really easy
to 
> get wrong!
>
> Paul
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>


Wed, May 16 2007 17:26:46    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.3.3.061214
Date Wed, 16 May 2007 08:26:34 -0700
Subject Re: [GRASS-dev] d.histogram problem [bug #1977]
From Michael Barton <michael.barton@asu.edu>
To Paul Kelly <paul-grass@stjohnspoint.co.uk>, <grass-dev@grass.itc.it>
Cc Paolo Cavallini via RT <grass-bugs@intevation.de>, Hamish <hamish_nospam@yahoo.com>
Message-ID <C27070BA.2234A%michael.barton@asu.edu>
Thread-Topic [GRASS-dev] d.histogram problem [bug #1977]
Thread-Index AceXzpYP1M+GeAPBEdyJKAAX8scpqg==
In-Reply-To <Pine.LNX.4.62.0705152252390.10148@agrippa.ukshells.co.uk>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-3.5 tagged_above=-999 required=3.5 tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.5]
X-Spam-Score -3.5
X-Spam-Level
I can probably write GUI code to make a nice histogram, using output from
r.stats. But Glynn's point about having GRASS tools available for scripting
is well taken. Also, it's a lot easier to simply call d.histogram than to
manually write the code to create a histogram.

Since you folks are looking at the guts of d.histogram, I should point out
that primitive as it is, it can create a couple of statistical graphs
(histogram and pie graph based on internal binning calculations), a bar
graph (what the histogram is actually drawing), and a pie graph. If it can
draw a bar graph, it can probably draw a line graph and scatter plot with
little additional work.

This could make it a fairly comprehensive internal graphing utility, with
limited but useful statistical capabilities, that could be applied to a
variety of tasks (e.g., displays from r.regression, several image processing
functions). 

I don't know if it is worth the effort or not, but maybe it is worth
thinking about for a few minutes at least.

Michael


On 5/15/07 3:04 PM, "Paul Kelly" <paul-grass@stjohnspoint.co.uk> wrote:

> On Tue, 15 May 2007, Paul Kelly wrote:
> 
>> On Tue, 15 May 2007, Hamish wrote:
>> 
>>> ok, so bug #1977 still matters. (axes tags somewhat broken for FP maps)
>>>  http://intevation.de/rt/webrt?serial_num=1977
>> 
>> I wonder is there a bit more too it that just the axes labelling. E.g. I
>> tried comparing the output of "r.stats -c input=slope nsteps=10" to what
>> d.histogram draws for nsteps=10. r.stats says:
>> 0-5.252012 81333
>> 5.252012-10.504024 86135
>> 10.504024-15.756036 60593
>> 15.756036-21.008047 37301
>> 21.008047-26.260059 16918
>> 26.260059-31.512071 6275
>> 31.512071-36.764083 1415
>> 36.764083-42.016095 139
>> 42.016095-47.268107 13
>> 47.268107-52.520119 1
>> * 12929
>> 
>> i.e. it seems obvious the first bar should cover the range 0-5.25012 and so
>> on (although I think it's fine that the x-axis label shows whole numbers;
it
>> doesn't need to line up with the bar/bin edges), but in the d.histogram
>> output it seems quite clear that the first bar is drawn between 5 and 10
>> (approximately) on the x-axis.
> 
> Actually, to put that another way you could say the numbers on the x-axis
> are in completely the wrong places. To me, it seems the numbers shown
> under the ticks refer to the floor'ed value (i.e. probably a double cast
> to an int) of the maximum value included in the bin to the right of the
> tickmark, if that makes sense. I.e. the numbers are one-off to the left
> of the ticks they represent, but even if shown under the correct tick they
> would still be wrong because they have been truncated to integers.
> 
> (Looking at the output of r.stats -c xxx nsteps=xx next to the histogram
> plot is really helpful for understanding this.)
> 
> I think the ticks should have no relation to the position of the borders
> between the bars. The left-hand edge of the first bar should start at the
> minimum value of the data and the right hand edge of the last bar should
> end at the maximum value of the data. I think round numbers in between
> should be marked with ticks (spacing worked out somehow from the
> hard-coded maximum 40 bins between numbered ticks).
> 
> That's probably easier to fix, than to put a more comprehensive fix in
> that would do the binning within d.histogram rather than relying on
> r.stats to do it all. Such a solution would enable the number of bins for
> integer maps to be specified too. At present this really doesn't seem
> possible without changing the structure of either d.histogram or r.stats.
> 
> Paul
> 
> 
>> 
>> Also it seems strange that it doesn't allow you to set the number of bins
for
>> non-floating point maps.
>> 
>> Also, 255 bins seems not a very good default to me. It is a bit high and the
>> result doesn't really look like a histogram.
>> 
>> I'll try and look into it more if I have time. Always remember doing maths
at
>> school and drawing a proper histogram being something that was really easy
to
>> get wrong!
>> 
>> Paul
>> 
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev@grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grass-dev
>> 
> 
> 

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


Wed, May 16 2007 22:52:00    Mail sent by paul-grass@stjohnspoint.co.uk  
Return-Path <paul-grass@stjohnspoint.co.uk>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 16 May 2007 21:52:13 +0100 (BST)
From Paul Kelly <paul-grass@stjohnspoint.co.uk>
X-X-Sender paulk@agrippa.ukshells.co.uk
To grass-dev@grass.itc.it
Cc grass-bugs@intevation.de, Hamish <hamish_nospam@yahoo.com>
Subject Re: [GRASS-dev] d.histogram problem [bug #1977]
In-Reply-To <Pine.LNX.4.62.0705152252390.10148@agrippa.ukshells.co.uk>
Message-ID <Pine.LNX.4.62.0705162147280.30265@agrippa.ukshells.co.uk>
References <20070514172522.449d978b.hamish_nospam@yahoo.com> <C26DB00D.22221%michael.barton@asu.edu> <20070515151506.0b8011da.hamish_nospam@yahoo.com> <Pine.LNX.4.62.0705151906140.7866@agrippa.ukshells.co.uk> <Pine.LNX.4.62.0705152252390.10148@agrippa.ukshells.co.uk>
MIME-Version 1.0
Content-Type MULTIPART/MIXED; BOUNDARY="182016655-1642576486-1179348733=:30265"
X-SA-Do-Not-Run Yes
X-SA-Exim-Connect-IP 217.10.143.90
X-SA-Exim-Mail-From paul-grass@stjohnspoint.co.uk
X-SA-Exim-Scanned No (on mail.ukshells.net); SAEximRunCond expanded to false
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-5 tagged_above=-999 required=3.5 tests=[BAYES_00=-5]
X-Spam-Score -5
X-Spam-Level
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--182016655-1642576486-1179348733=:30265
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Attached is a patch that seems to solve the worst of the d.histogram 
problems for me. I.e.
* the tick spacing is done correctly for large number of bins in a 
floating point map
* Range boundaries are calculated correctly (not off by one) and printed 
to 3 significant figures rather than being truncated to integers
* For integer maps the cell value covered by each bar is printed in the 
centre of the bar rather than to the left-hand side of it

But I haven't touched pie.c so it will only be fixed for bar graphs. And 
in general the code of the whole program is terribly convoluted and there 
could definitely be other subtle errors lurking in there I think. Also the 
text printing, ticks etc. could definitely be tidied up and made prettier.

But does it solve the problems others were having?

Paul
--182016655-1642576486-1179348733=:30265
Content-Type: TEXT/plain; charset=US-ASCII; name=diff.txt
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.62.0705162152130.30265@agrippa.ukshells.co.uk>
Content-Description: 
Content-Disposition: attachment; filename=diff.txt

SW5kZXg6IGJhci5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQpSQ1MgZmls
ZTogL2hvbWUvZ3Jhc3MvZ3Jhc3NyZXBvc2l0b3J5L2dyYXNzNi9kaXNwbGF5
L2QuaGlzdG9ncmFtL2Jhci5jLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMi4y
DQpkaWZmIC11IC1yMi4yIGJhci5jDQotLS0gYmFyLmMJMTUgQXByIDIwMDcg
MTk6MzU6MTkgLTAwMDAJMi4yDQorKysgYmFyLmMJMTYgTWF5IDIwMDcgMjA6
NDU6MzEgLTAwMDANCkBAIC0xMTIsMTQgKzExMiwxMSBAQA0KIAkJICAgaWYo
R19pc19kX251bGxfdmFsdWUoJnJhbmdlX2RtaW4pIHx8IEdfaXNfZF9udWxs
X3ZhbHVlKCZyYW5nZV9kbWF4KSkNCiAJCSAgICAgICAgR19mYXRhbF9lcnJv
cigiRmxvYX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ICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAJ
CQkJICAgICBpZihkbWluICE9IGRtYXgpDQpAQCAtMjgyLDkgKzI3OSw5IEBA
DQogCQkJCQkJICZkbWluLCAmZG1heCk7DQogICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIGVsc2UNCiAJCQkJICAgICB7DQotCQkJCSAg
ICAgICBkbWluPXJhbmdlX2RtaW4rKGRvdWJsZSlpKg0KKwkJCQkgICAgICAg
ZG1pbj1yYW5nZV9kbWluKyhkb3VibGUpKGktMSkqDQogICAJCQkJICAgICAg
ICAgKHJhbmdlX2RtYXgtcmFuZ2VfZG1pbikvKGRvdWJsZSluc3RlcHM7DQot
CQkJCSAgICAgICBkbWF4PXJhbmdlX2RtaW4rKGRvdWJsZSkoaSsxKSoNCisJ
CQkJICAgICAgIGRtYXg9cmFuZ2VfZG1pbisoZG91YmxlKShpKSoNCiAgIAkJ
CQkgICAgICAgICAocmFuZ2VfZG1heC1yYW5nZV9kbWluKS8oZG91YmxlKW5z
dGVwczsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
fQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEX2Rf
Y29sb3IoZG1pbiwgY29sb3JzKTsNCkBAIC0zMDcsMTcgKzMwNCwyNyBAQA0K
IAkJICAgICAgaT09ZGlzdF9zdGF0cy0+bWluY2F0ICYmIG5vZGF0YSkgDQog
CQkgICAgICAmJiAhKG5vZGF0YSAmJiBpPT1kaXN0X3N0YXRzLT5taW5jYXQr
MSkpDQogCQl7DQorCQkgICAgICAgIGludCB0ZXh0X21pZGRsZSA9IDA7IC8q
IFByaW50IHRleHQgbGFiZWxzIGluIG1pZGRsZQ0KKwkJCQkJICAgICAgKiBv
ZiBpbnRlcnZhbHMgKi8NCisJCSAgICAgICAgZG91YmxlIHRleHRfb2Zmc2V0
Ow0KKwkJICAgDQogCQkJLyogZHJhdyBhIG51bWJlcmVkIHRpY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0YiwmdGws
JnRyKTsNCiAJCQl9DQotCQkJUl9tb3ZlX2FicygoaW50KSh4b2Zmc2V0Kyhp
LWRpc3Rfc3RhdHMtPm1pbmNhdCkqeHNjYWxlIC0gMC41ICogeHNjYWxlIC0o
dHItdGwpLzIpLA0KKwkJICAgICAgICBpZiAodGV4dF9taWRkbGUpDQorCQkg
ICAgICAgICAgICB0ZXh0X29mZnNldCA9IDA7DQorCQkgICAgICAgIGVsc2UN
CisJCSAgICAgICAgICAgIHRleHRfb2Zmc2V0ID0gLSAoMC41ICogeHNjYWxl
KTsNCisJCQlSX21vdmVfYWJzKChpbnQpKHhvZmZzZXQrKGktZGlzdF9zdGF0
cy0+bWluY2F0KSp4c2NhbGUgKyB0ZXh0X29mZnNldCAtKHRyLXRsKS8yKSwN
CiAJCQkgICAgKGludCkoYi1YTlVNU19ZKihiLXQpKSk7DQogCQkJUl90ZXh0
KHR4dCk7DQogCQl9DQo=

--182016655-1642576486-1179348733=:30265--


Thu, May 17 2007 08:32:31    Mail sent by michael.barton@asu.edu  
Return-Path <michael.barton@asu.edu>
Delivered-To grass-bugs@lists.intevation.de
User-Agent Microsoft-Entourage/11.3.3.061214
Date Wed, 16 May 2007 23:32:17 -0700
Subject Re: [GRASS-dev] d.histogram problem [bug #1977]
From Michael Barton <michael.barton@asu.edu>
To Paul Kelly <paul-grass@stjohnspoint.co.uk>, <grass-dev@grass.itc.it>
Cc Paolo Cavallini via RT <grass-bugs@intevation.de>, Hamish <hamish_nospam@yahoo.com>
Message-ID <C2714501.22411%michael.barton@asu.edu>
Thread-Topic [GRASS-dev] d.histogram problem [bug #1977]
Thread-Index AceYTR0DW1iWygRAEdyJKAAX8scpqg==
In-Reply-To <Pine.LNX.4.62.0705162147280.30265@agrippa.ukshells.co.uk>
Mime-version 1.0
Content-type text/plain; charset="US-ASCII"
Content-transfer-encoding 7bit
X-Virus-Scanned by amavisd-new
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, score=-3.5 tagged_above=-999 required=3.5 tests=[BAYES_00=-5, RCVD_NUMERIC_HELO=1.5]
X-Spam-Score -3.5
X-Spam-Level
I'll try it out and see.

Michael


On 5/16/07 1:52 PM, "Paul Kelly" <paul-grass@stjohnspoint.co.uk> wrote:

> Attached is a patch that seems to solve the worst of the d.histogram
> problems for me. I.e.
> * the tick spacing is done correctly for large number of bins in a
> floating point map
> * Range boundaries are calculated correctly (not off by one) and printed
> to 3 significant figures rather than being truncated to integers
> * For integer maps the cell value covered by each bar is printed in the
> centre of the bar rather than to the left-hand side of it
> 
> But I haven't touched pie.c so it will only be fixed for bar graphs. And
> in general the code of the whole program is terribly convoluted and there
> could definitely be other subtle errors lurking in there I think. Also the
> text printing, ticks etc. could definitely be tidied up and made prettier.
> 
> But does it solve the problems others were having?
> 
> Paul

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


Comment | Reply | Take | Resolve

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