Discussion:
[GRASSGUI] New profiling module for wxgrass
Michael Barton
2007-11-14 22:56:51 UTC
Permalink
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: plotmodule.jpeg
Type: application/octet-stream
Size: 63530 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-gui/attachments/20070521/22a134ba/plotmodule.obj
Jachym Cepicky
2007-11-14 22:56:51 UTC
Permalink
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
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
http://grass.itc.it/mailman/listinfo/grassgui
--
Jachym Cepicky
e-mail: ***@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
Michael Barton
2007-11-14 22:56:51 UTC
Permalink
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
Post by Jachym Cepicky
Hi Michael,
it looks nice, but it does not seem to work for me. When I draw the
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
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
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
2007-11-14 22:56:51 UTC
Permalink
hi,
Post by Michael Barton
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
Post by Michael Barton
Michael
Post by Jachym Cepicky
Hi Michael,
it looks nice, but it does not seem to work for me. When I draw the
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
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
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: ***@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
Martin Landa
2007-11-14 22:56:51 UTC
Permalink
Hi,

2007/5/22, Carlos Gu?no Grohmann <***@gmail.com>:

[snip]
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 <***@gmail.com> * http://gama.fsv.cvut.cz/~landa *
Jachym Cepicky
2007-11-14 22:56:51 UTC
Permalink
hi,

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

Great work!

jachym
Post by Michael Barton
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
Post by Jachym Cepicky
Hi Michael,
it looks nice, but it does not seem to work for me. When I draw the
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
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
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: ***@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.osgeo.org/pipermail/grass-gui/attachments/20070524/4c5c501f/attachment.bin
Michael Barton
2007-11-14 22:56:51 UTC
Permalink
I wonder if it really needs numpy and that the other two are too old, in
spite of what the docs say?

Michael
Post by Jachym Cepicky
hi,
I had to install all tree packages - now it works.
Great work!
jachym
Post by Michael Barton
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
Post by Jachym Cepicky
Hi Michael,
it looks nice, but it does not seem to work for me. When I draw the
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
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
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
2007-11-14 22:56:51 UTC
Permalink
python-numpy - needed for profiling tool
python-numeric - several gnome and other packages are using it
python-numarray - not needed

Jachym
Post by Michael Barton
I wonder if it really needs numpy and that the other two are too old, in
spite of what the docs say?
Michael
Post by Jachym Cepicky
hi,
I had to install all tree packages - now it works.
Great work!
jachym
Post by Michael Barton
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
Post by Jachym Cepicky
Hi Michael,
it looks nice, but it does not seem to work for me. When I draw the
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
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
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: ***@gmail.com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?=
=?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?=
=?ISO-8859-1?Q?_zpr=E1vy?=
Url : http://lists.osgeo.org/pipermail/grass-gui/attachments/20070525/c285de0f/attachment.bin
Michael Barton
2007-11-14 22:56:51 UTC
Permalink
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
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

Loading...