[GRASS-dev] d.histogram: x axis ticks labels fixed

On Jan 27, 2008, at 3:55 AM, grass-dev-request@lists.osgeo.org wrote:

Date: Sun, 27 Jan 2008 01:00:14 -0800 (PST)
From: Hamish <hamish_b@yahoo.com>
Subject: Re: [GRASS-dev] d.histogram: x axis ticks labels fixed
To: Markus Neteler <neteler@osgeo.org>, GRASS developers list
  <grass-dev@lists.osgeo.org>
Message-ID: <889403.25171.qm@web45807.mail.sp1.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

Markus Neteler wrote:

the x axis ticks in d.histogram are often completey messed
up, especially for FP maps with range 0..1.0

bug report for this:
  http://intevation.de/rt/webrt?serial_num=1977
(note Paul had posted a patch there some months ago)

I have hacked display/d.histogram/bar.c
-> line 116 etc
to get readable output for most FP maps (before there wasn't).

I've done a quick test and it looks good. nice!
Resizing the xmon window recalculates the tick placement, if you want
to do a lot of testing quickly.

I have also added a fix (line 321) to enable FP number output for
small range maps, e.g. (NC OSGeo data set):

If I convert elevation.dem to a 0.0-1.0 FP map, the x axis tick labels
are all still "0". :frowning:

#spearfish
r.mapcalc elev.norm="(elevation.dem - 1066.) / (1840-1066.)"
d.histogram elev.norm

Before we spend too much more time on this module, were there plans to
reimplement the module as a wxPython program using one of the python
plotting libs?

This is a good idea. But with the improvements to d.histogram, it's relatively low on my priority list over other modules like georectification (me), digitizing (Martin), overall improved stability (all of us), and NVIZ (who??).

Michael

'd.histogram -q' seems to be broken. (was a quiet flag removed from
r.stats?)

cheers,
Hamish

____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

On Jan 27, 2008 4:44 PM, Michael Barton <michael.barton@asu.edu> wrote:

On Jan 27, 2008, at 3:55 AM, grass-dev-request@lists.osgeo.org wrote:
> Markus Neteler wrote:
>> the x axis ticks in d.histogram are often completey messed
>> up, especially for FP maps with range 0..1.0
>
> bug report for this:
> http://intevation.de/rt/webrt?serial_num=1977
> (note Paul had posted a patch there some months ago)

ah, I wasn't aware of this patch. Never mind.

...

> If I convert elevation.dem to a 0.0-1.0 FP map, the x axis tick labels
> are all still "0". :frowning:
>
> #spearfish
> r.mapcalc elev.norm="(elevation.dem - 1066.) / (1840-1066.)"
> d.histogram elev.norm

Fixed.

> Before we spend too much more time on this module, were there plans to
> reimplement the module as a wxPython program using one of the python
> plotting libs?

This is a good idea. But with the improvements to d.histogram, it's
relatively low on my priority list over other modules like
georectification (me), digitizing (Martin), overall improved
stability (all of us), and NVIZ (who??).

Jaro Hofierka once told me that he is interested in a NVIZ port
to Python. Perhaps he could find students to be involved?

Markus

On Jan 27, 2008, at 8:57 AM, Markus Neteler wrote:

Jaro Hofierka once told me that he is interested in a NVIZ port
to Python. Perhaps he could find students to be involved?

Markus

That would be excellent!

Michael

____________________
C. Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>