[GRASS-dev] New profiling module for wxgrass

Following up on the general gist of discussions about graphing, I created a new profiling module for wxgrass using the plot module in wxPython. Although the docs stated that it required numeric, numarray, or numpy as a dependency, it was not clear during development if this particular application of the plot module did indeed require this.

I’ve now tested it on another system and can verify that to run the new profile module (profile.py) you’ll need one of these dependent modules (any will work). They are available from a variety of sources. I’ll try to get together a list and put it in the README if we want to continue with this.

I will say that doing the profile with plot produced a very nice result (I’ve attached a screenshot here) with about 1/3 of the code I’d need to do it manually. It also makes it very easy to do other simple graphs (mainly line and point graphs, though bar graphs are also possible) with very little in the way of coding—built in save to file, printing, zooming, dragging, scrolling, and log scales for example.

Let me know what you think (after you’ve installed numeric/numarray/numpy).

Michael


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

(attachments)

plotmodule.jpeg

Hi Michael,

it looks nice, but it does not seem to work for me. When I draw the
profile and click on the "create profile" button, I get:

  File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
in CreateProfile
    self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
legend='Profile')
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
line 224, in __init__
    PolyPoints.__init__(self, points, attr)
  File
"/usr/lib/python2.5/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

Thanks for this effort

Jachym

Michael Barton píše v Po 21. 05. 2007 v 16:27 -0700:

Following up on the general gist of discussions about graphing, I
created a new profiling module for wxgrass using the plot module in
wxPython. Although the docs stated that it required numeric, numarray,
or numpy as a dependency, it was not clear during development if this
particular application of the plot module did indeed require this.

I’ve now tested it on another system and can verify that to run the
new profile module (profile.py) you’ll need one of these dependent
modules (any will work). They are available from a variety of sources.
I’ll try to get together a list and put it in the README if we want to
continue with this.

I will say that doing the profile with plot produced a very nice
result (I’ve attached a screenshot here) with about 1/3 of the code
I’d need to do it manually. It also makes it very easy to do other
simple graphs (mainly line and point graphs, though bar graphs are
also possible) with very little in the way of coding—built in save to
file, printing, zooming, dragging, scrolling, and log scales for
example.

Let me know what you think (after you’ve installed
numeric/numarray/numpy).

Michael
__________________________________________
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
_______________________________________________
grassgui mailing list
grassgui@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassgui

--
Jachym Cepicky
e-mail: jachym.cepicky@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

Do you have numeric, numarray, or numpy installed (and the proper one for
your Python version)? Also, does the Pyplot demo work for you?

Michael

On 5/21/07 10:25 PM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:

Hi Michael,

it looks nice, but it does not seem to work for me. When I draw the
profile and click on the "create profile" button, I get:

  File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
in CreateProfile
    self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
legend='Profile')
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
line 224, in __init__
    PolyPoints.__init__(self, points, attr)
  File
"/usr/lib/python2.5/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

Thanks for this effort

Jachym

Michael Barton pí¹e v Po 21. 05. 2007 v 16:27 -0700:

Following up on the general gist of discussions about graphing, I
created a new profiling module for wxgrass using the plot module in
wxPython. Although the docs stated that it required numeric, numarray,
or numpy as a dependency, it was not clear during development if this
particular application of the plot module did indeed require this.

I've now tested it on another system and can verify that to run the
new profile module (profile.py) you'll need one of these dependent
modules (any will work). They are available from a variety of sources.
I'll try to get together a list and put it in the README if we want to
continue with this.

I will say that doing the profile with plot produced a very nice
result (I've attached a screenshot here) with about 1/3 of the code
I'd need to do it manually. It also makes it very easy to do other
simple graphs (mainly line and point graphs, though bar graphs are
also possible) with very little in the way of coding--built in save to
file, printing, zooming, dragging, scrolling, and log scales for
example.

Let me know what you think (after you've installed
numeric/numarray/numpy).

Michael
__________________________________________
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
_______________________________________________
grassgui mailing list
grassgui@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassgui

__________________________________________
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

hi,

Michael Barton píše v Po 21. 05. 2007 v 22:39 -0700:

Do you have numeric, numarray, or numpy installed (and the proper one for
your Python version)? Also, does the Pyplot demo work for you?

yes for both (python-numeric), wxwidgets 2.8.1.1 from ubuntu package

j

Michael

On 5/21/07 10:25 PM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:

> Hi Michael,
>
> it looks nice, but it does not seem to work for me. When I draw the
> profile and click on the "create profile" button, I get:
>
> File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
> in CreateProfile
> self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
> legend='Profile')
> File
> "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
> line 224, in __init__
> PolyPoints.__init__(self, points, attr)
> File
> "/usr/lib/python2.5/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
>
> Thanks for this effort
>
> Jachym
>
> Michael Barton píše v Po 21. 05. 2007 v 16:27 -0700:
>> Following up on the general gist of discussions about graphing, I
>> created a new profiling module for wxgrass using the plot module in
>> wxPython. Although the docs stated that it required numeric, numarray,
>> or numpy as a dependency, it was not clear during development if this
>> particular application of the plot module did indeed require this.
>>
>> I've now tested it on another system and can verify that to run the
>> new profile module (profile.py) you'll need one of these dependent
>> modules (any will work). They are available from a variety of sources.
>> I'll try to get together a list and put it in the README if we want to
>> continue with this.
>>
>> I will say that doing the profile with plot produced a very nice
>> result (I've attached a screenshot here) with about 1/3 of the code
>> I'd need to do it manually. It also makes it very easy to do other
>> simple graphs (mainly line and point graphs, though bar graphs are
>> also possible) with very little in the way of coding--built in save to
>> file, printing, zooming, dragging, scrolling, and log scales for
>> example.
>>
>> Let me know what you think (after you've installed
>> numeric/numarray/numpy).
>>
>> Michael
>> __________________________________________
>> 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
>> _______________________________________________
>> grassgui mailing list
>> grassgui@grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grassgui

__________________________________________
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

--
Jachym Cepicky
e-mail: jachym.cepicky@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

Working fine here (Xubuntu 7.04). I installed all num*py stuff
(numarray, numpy, numeric).

Really nice the possibility to zoom in and out of the plot (at least
for me the left button was zoom in and the right button was zoom out).

Wishlits: export the plot in some vectorial format, such as svg, so we
can put that in a drawing program for final editing.

Carlos

PS: I get this error when I tried to set the region from display:

Set region from display:

Traceback (most recent call last):
  File "/usr/local/grass-6.3.cvs/etc/wx/gui_modules/mapdisp.py", line
916, in DisplayToWind
    p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
NameError: global name 'Popen' is not defined

On 5/22/07, Jachym Cepicky <jachym.cepicky@gmail.com> wrote:

hi,

Michael Barton píše v Po 21. 05. 2007 v 22:39 -0700:
> Do you have numeric, numarray, or numpy installed (and the proper one for
> your Python version)? Also, does the Pyplot demo work for you?

yes for both (python-numeric), wxwidgets 2.8.1.1 from ubuntu package

j
>
> Michael
>
> On 5/21/07 10:25 PM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:
>
> > Hi Michael,
> >
> > it looks nice, but it does not seem to work for me. When I draw the
> > profile and click on the "create profile" button, I get:
> >
> > File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
> > in CreateProfile
> > self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
> > legend='Profile')
> > File
> > "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
> > line 224, in __init__
> > PolyPoints.__init__(self, points, attr)
> > File
> > "/usr/lib/python2.5/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
> >
> > Thanks for this effort
> >
> > Jachym
> >
> > Michael Barton píše v Po 21. 05. 2007 v 16:27 -0700:
> >> Following up on the general gist of discussions about graphing, I
> >> created a new profiling module for wxgrass using the plot module in
> >> wxPython. Although the docs stated that it required numeric, numarray,
> >> or numpy as a dependency, it was not clear during development if this
> >> particular application of the plot module did indeed require this.
> >>
> >> I've now tested it on another system and can verify that to run the
> >> new profile module (profile.py) you'll need one of these dependent
> >> modules (any will work). They are available from a variety of sources.
> >> I'll try to get together a list and put it in the README if we want to
> >> continue with this.
> >>
> >> I will say that doing the profile with plot produced a very nice
> >> result (I've attached a screenshot here) with about 1/3 of the code
> >> I'd need to do it manually. It also makes it very easy to do other
> >> simple graphs (mainly line and point graphs, though bar graphs are
> >> also possible) with very little in the way of coding--built in save to
> >> file, printing, zooming, dragging, scrolling, and log scales for
> >> example.
> >>
> >> Let me know what you think (after you've installed
> >> numeric/numarray/numpy).
> >>
> >> Michael
> >> __________________________________________
> >> 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
> >> _______________________________________________
> >> grassgui mailing list
> >> grassgui@grass.itc.it
> >> http://grass.itc.it/mailman/listinfo/grassgui
>
> __________________________________________
> 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
>
--
Jachym Cepicky
e-mail: jachym.cepicky@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
+-----------------------------------------------------------+
              Carlos Henrique Grohmann - Guano
  Geologist M.Sc - Doctorate Student at IGc-USP - Brazil
Linux User #89721 - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke

Hi,

2007/5/22, Carlos Guâno Grohmann <carlos.grohmann@gmail.com>:

[snip]

PS: I get this error when I tried to set the region from display:

Set region from display:

Traceback (most recent call last):
  File "/usr/local/grass-6.3.cvs/etc/wx/gui_modules/mapdisp.py", line
916, in DisplayToWind
    p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
NameError: global name 'Popen' is not defined

Fixed in SVN.

Martin

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

This is an issue with the subprocess module. Check in your import statements
at the top of the module. Maybe you need a separate version of subprocess.

Michael

On 5/22/07 2:28 AM, "Carlos "Guâno" Grohmann" <carlos.grohmann@gmail.com>
wrote:

Traceback (most recent call last):
  File "/usr/local/grass-6.3.cvs/etc/wx/gui_modules/mapdisp.py", line
916, in DisplayToWind
    p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
NameError: global name 'Popen' is not defined

__________________________________________
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

Glad to see another component falling into place.

PyGui profiling tool wishlists:

* take y-axis label from new "r.info -u", if present.

* use grey "+" for segment breaks, not red "o"? skip for beginning and
end points.

* autoscale x-axis into km etc, when appropriate. See how the Tcl/Tk
version of the profile tool does this in 6.3 CVS.

* Is the legend really needed? if so, can you add in a blank space before
the text? (a little more space around all the text would be nice)

* can the exit button be packed apart on the right hand edge of the window?

* end the plot closer to the max x value? (eg at 18000 in the screenshot)

thanks,
Hamish

Hamish,

Thanks for testing this. It is not yet done, so this is a good opportunity
to ask about features. In part, this is a test for me to see what is
involved in scripting a graphing application for GRASS using wxPython plot.
If I get this worked out, the tools should be useable for other graphing
needs.

On 5/22/07 8:17 PM, "Hamish" <hamish_nospam@yahoo.com> wrote:

Glad to see another component falling into place.

PyGui profiling tool wishlists:

* take y-axis label from new "r.info -u", if present.

Planning to do this once I update from the cvs this week. But...

I'm also allowing the user to set custom profile title and axis labels,
along with font size and face (working on this now). So you can stick with
the default or roll your own.

* use grey "+" for segment breaks, not red "o"? skip for beginning and
end points.

I can probably take out the beginning and end if this is desirable. I'm
thinking about offering user selected symbols, colors (and size and fill?)
for the segment markers, and line color and width for the profile. How does
that sound?

* autoscale x-axis into km etc, when appropriate. See how the Tcl/Tk
version of the profile tool does this in 6.3 CVS.

Planning to do this when I get the rest of the profile working OK. I like
what you've done and already have a python method that returns g.proj info
on request (including units). I can manually set the vertical and horizontal
ranges (though not the interval AFAICT), but plot seems to do a pretty good
job. What do you think?

* Is the legend really needed? if so, can you add in a blank space before
the text? (a little more space around all the text would be nice)

I'm going to make the legend customizable too. On/off and text size. But
maybe we don't need it. There is supposed to be some way to autogenerate
labels for points, but it is not well documented and I haven't tried the
tedious trial and error to see how it works.

I've had no luck giving the axis labels more space. I haven't tried with the
legend yet, but will do so.

* can the exit button be packed apart on the right hand edge of the window?

Maybe, but I don't know how to do it. Maybe Jachym or Daniel would know.

* end the plot closer to the max x value? (eg at 18000 in the screenshot)

This is using the auto axis option. It tries to come up with a reasonable
round number. Sometimes the plot is at the end and sometimes it isn't. I can
set the range, if need be.

Michael

__________________________________________
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

> * can the exit button be packed apart on the right hand edge of the
> window?

Also in the main Tcl menu I was trying to figure out how to pack the Help
menu over to the right hand side, but no luck.

http://www.cis.rl.ac.uk/Publications/Cookbook/mb.html

Hamish

hi,

I had to install all tree packages - now it works.

Great work!

jachym

Michael Barton píše v Po 21. 05. 2007 v 22:39 -0700:

Do you have numeric, numarray, or numpy installed (and the proper one for
your Python version)? Also, does the Pyplot demo work for you?

Michael

On 5/21/07 10:25 PM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:

> Hi Michael,
>
> it looks nice, but it does not seem to work for me. When I draw the
> profile and click on the "create profile" button, I get:
>
> File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
> in CreateProfile
> self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
> legend='Profile')
> File
> "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
> line 224, in __init__
> PolyPoints.__init__(self, points, attr)
> File
> "/usr/lib/python2.5/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
>
> Thanks for this effort
>
> Jachym
>
> Michael Barton píše v Po 21. 05. 2007 v 16:27 -0700:
>> Following up on the general gist of discussions about graphing, I
>> created a new profiling module for wxgrass using the plot module in
>> wxPython. Although the docs stated that it required numeric, numarray,
>> or numpy as a dependency, it was not clear during development if this
>> particular application of the plot module did indeed require this.
>>
>> I've now tested it on another system and can verify that to run the
>> new profile module (profile.py) you'll need one of these dependent
>> modules (any will work). They are available from a variety of sources.
>> I'll try to get together a list and put it in the README if we want to
>> continue with this.
>>
>> I will say that doing the profile with plot produced a very nice
>> result (I've attached a screenshot here) with about 1/3 of the code
>> I'd need to do it manually. It also makes it very easy to do other
>> simple graphs (mainly line and point graphs, though bar graphs are
>> also possible) with very little in the way of coding--built in save to
>> file, printing, zooming, dragging, scrolling, and log scales for
>> example.
>>
>> Let me know what you think (after you've installed
>> numeric/numarray/numpy).
>>
>> Michael
>> __________________________________________
>> 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
>> _______________________________________________
>> grassgui mailing list
>> grassgui@grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grassgui

__________________________________________
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

--
Jachym Cepicky
e-mail: jachym.cepicky@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

I wonder if it really needs numpy and that the other two are too old, in
spite of what the docs say?

Michael

On 5/24/07 7:55 AM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:

hi,

I had to install all tree packages - now it works.

Great work!

jachym

Michael Barton pí¹e v Po 21. 05. 2007 v 22:39 -0700:

Do you have numeric, numarray, or numpy installed (and the proper one for
your Python version)? Also, does the Pyplot demo work for you?

Michael

On 5/21/07 10:25 PM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:

Hi Michael,

it looks nice, but it does not seem to work for me. When I draw the
profile and click on the "create profile" button, I get:

  File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
in CreateProfile
    self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
legend='Profile')
  File
"/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
line 224, in __init__
    PolyPoints.__init__(self, points, attr)
  File
"/usr/lib/python2.5/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

Thanks for this effort

Jachym

Michael Barton pí¹e v Po 21. 05. 2007 v 16:27 -0700:

Following up on the general gist of discussions about graphing, I
created a new profiling module for wxgrass using the plot module in
wxPython. Although the docs stated that it required numeric, numarray,
or numpy as a dependency, it was not clear during development if this
particular application of the plot module did indeed require this.

I've now tested it on another system and can verify that to run the
new profile module (profile.py) you'll need one of these dependent
modules (any will work). They are available from a variety of sources.
I'll try to get together a list and put it in the README if we want to
continue with this.

I will say that doing the profile with plot produced a very nice
result (I've attached a screenshot here) with about 1/3 of the code
I'd need to do it manually. It also makes it very easy to do other
simple graphs (mainly line and point graphs, though bar graphs are
also possible) with very little in the way of coding--built in save to
file, printing, zooming, dragging, scrolling, and log scales for
example.

Let me know what you think (after you've installed
numeric/numarray/numpy).

Michael
__________________________________________
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
_______________________________________________
grassgui mailing list
grassgui@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassgui

__________________________________________
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

__________________________________________
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

python-numpy - needed for profiling tool
python-numeric - several gnome and other packages are using it
python-numarray - not needed

Jachym

Michael Barton píše v Čt 24. 05. 2007 v 09:02 -0700:

I wonder if it really needs numpy and that the other two are too old, in
spite of what the docs say?

Michael

On 5/24/07 7:55 AM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:

> hi,
>
> I had to install all tree packages - now it works.
>
> Great work!
>
> jachym
>
> Michael Barton píše v Po 21. 05. 2007 v 22:39 -0700:
>> Do you have numeric, numarray, or numpy installed (and the proper one for
>> your Python version)? Also, does the Pyplot demo work for you?
>>
>> Michael
>>
>>
>> On 5/21/07 10:25 PM, "Jachym Cepicky" <jachym.cepicky@gmail.com> wrote:
>>
>>> Hi Michael,
>>>
>>> it looks nice, but it does not seem to work for me. When I draw the
>>> profile and click on the "create profile" button, I get:
>>>
>>> File "/usr/src/gis/grass/addons/gui/gui_modules/profile.py", line 320,
>>> in CreateProfile
>>> self.pline = plot.PolyLine(self.datalist, colour='blue', width=2,
>>> legend='Profile')
>>> File
>>> "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/lib/plot.py",
>>> line 224, in __init__
>>> PolyPoints.__init__(self, points, attr)
>>> File
>>> "/usr/lib/python2.5/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
>>>
>>> Thanks for this effort
>>>
>>> Jachym
>>>
>>> Michael Barton píše v Po 21. 05. 2007 v 16:27 -0700:
>>>> Following up on the general gist of discussions about graphing, I
>>>> created a new profiling module for wxgrass using the plot module in
>>>> wxPython. Although the docs stated that it required numeric, numarray,
>>>> or numpy as a dependency, it was not clear during development if this
>>>> particular application of the plot module did indeed require this.
>>>>
>>>> I've now tested it on another system and can verify that to run the
>>>> new profile module (profile.py) you'll need one of these dependent
>>>> modules (any will work). They are available from a variety of sources.
>>>> I'll try to get together a list and put it in the README if we want to
>>>> continue with this.
>>>>
>>>> I will say that doing the profile with plot produced a very nice
>>>> result (I've attached a screenshot here) with about 1/3 of the code
>>>> I'd need to do it manually. It also makes it very easy to do other
>>>> simple graphs (mainly line and point graphs, though bar graphs are
>>>> also possible) with very little in the way of coding--built in save to
>>>> file, printing, zooming, dragging, scrolling, and log scales for
>>>> example.
>>>>
>>>> Let me know what you think (after you've installed
>>>> numeric/numarray/numpy).
>>>>
>>>> Michael
>>>> __________________________________________
>>>> 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
>>>> _______________________________________________
>>>> grassgui mailing list
>>>> grassgui@grass.itc.it
>>>> http://grass.itc.it/mailman/listinfo/grassgui
>>
>> __________________________________________
>> 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
>>
>>

__________________________________________
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

--
Jachym Cepicky
e-mail: jachym.cepicky@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

Very nice tool.
May I suggest to plot the xy coordinates of the start point, end point and each segment?

Each segment is marked with a point (default a triangle, but you can change
that). I'd originally marked the beginning and ending of the transect with a
point too, but Hamish suggested that it looks better to exclude these.

Glad this is working for you.

Michael

On 5/29/07 7:05 AM, "Agustin Diez Castillo" <Agustin.Diez@uv.es> wrote:

Very nice tool.
May I suggest to plot the xy coordinates of the start point, end
point and each segment?

__________________________________________
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