[GRASSGUI] wxgrass: histogram and profile

Michael Barton michael.barton at asu.edu
Mon Jun 4 14:55:01 EDT 2007


Thanks Markus. Some questions below.


On 5/30/07 9:24 AM, "Markus Neteler" <neteler at itc.it> wrote:

> Hi
> 
> (thanks for the alphabetical order!). Another report:
> 
> # trying the histogram in LatLong, I get:
> 
> Traceback (most recent call last):
> Traceback (most recent call last):
>   File "/home/neteler/grassaddons/gui/gui_modules/histogram.py", line 374, in
> OnOptions
>     menuform.GUI().parseCommand('d.histogram', gmpath,
> AttributeError: GUI instance has no attribute 'parseCommand'

AFAICT, this kind of error should affect all maps equally, regardless of
whether they are latlon or not. Is this the case?

If it is JUST latlon, then this is a bogus error that is masking what is
really wrong and needs fixing.

Does d.histogram work with latlon maps?


> 
> # trying profile on the same map
> Traceback (most recent call last):
>   File "/home/neteler/grassaddons/gui/gui_modules/profile.py", line 472, in
> CreateProfile
>     self.DrawPlot()
>   File "/home/neteler/grassaddons/gui/gui_modules/profile.py", line 492, in
> DrawPlot
>     legend=' '+self.plegend1)
>   File "/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
> line 224, in __init__
>     PolyPoints.__init__(self, points, attr)
>   File "/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
> line 124, in __init__
>     self._points = _Numeric.array(points).astype(_Numeric.Float64)
> ValueError: matrices are not aligned for copy
>     
> 
> I get the profile error also on other maps.
> Concerning the profile: It's not clear to me if I have to start with
> the second icon from left. If so, it would be more intuitive to put
> it to the left.

Start with the one on the left and work your way to the right. This is a bit
different from the TclTk version in that you draw the transect first. There
are internal programming reasons for this.

Do you have numpy installed? Jachym reports that contrary to the docs, you
need numpy and not just numeric or numarray. I've reported this to the
wxPython bug tracker.

Do you get the error if you draw the transect first?

> 
> # concering distance measure:
> I feel that the result in latlong is degree or so - could this be changed
> to metric output (like d.measure does with G_begin_distance_calculations())?

This is a very good idea. But how can we get distance in meters from the
map? Anyone?

Michael

> 
> thanks
> Markus
> 
> 

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

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




More information about the grass-gui mailing list