[Matplotlib-users] Can't seem to plot 2 horizontal lines on same plot

2008-10-07 Thread chris
I don't know what dumb thing I'm going but I can't seem to plot
2 horizontal lines on the same plot!!!


Why does this snippet give a *BLANK* plot when I run it?

(Either line separately seems to be ok!?!?)

import pylab
x1 = pylab.arange(-10, 10, 0.01)
x2 = pylab.arange(  0, 10, 0.01)
f1 = [0 for e in x1]
f2 = [1 for e in x2]
pylab.show(pylab.plot(x1, f1, x2, f2))


Chris

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't seem to plot 2 horizontal lines on same plot

2008-10-07 Thread Johann Rohwer
On Tuesday, 7 October 2008, [EMAIL PROTECTED] wrote:
 Why does this snippet give a *BLANK* plot when I run it?

 (Either line separately seems to be ok!?!?)

 import pylab
 x1 = pylab.arange(-10, 10, 0.01)
 x2 = pylab.arange(  0, 10, 0.01)
 f1 = [0 for e in x1]
 f2 = [1 for e in x2]
 pylab.show(pylab.plot(x1, f1, x2, f2))

The autoscaling feature sets the y limits to [0,1] which means that 
your lines are falling on the bottom and top x-axis which hides them. 
Rescaling the y-axis will make the lines visible, e.g.

pylab.ylim(-1,2)

Johann

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Animation and imshow

2008-10-07 Thread Alexander Borghgraef
I'm trying to figure out how to do animated graphics in pylab using
imshow, so I made this little 'hello world' equivalent showing a
moving square over two frames.
Problem is I have to call draw twice to refresh the image. Anyone can
explain why this is so (and how to do this more elegantly)? This is
the code:

from pylab import *
from numpy import *

ion()
hold(False)

frame1 = zeros((200, 200))
frame1[20:40, 20:40] = 255

frame2 = zeros((200, 200))
frame2[20:40, 30:50] = 255

m = imshow(frame1)
draw()   # shows frame1
m.set_data(frame2)
draw()   # still shows frame1!!!
draw()   # and now it shows frame2!??


-- 
Alex Borghgraef

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compiling problems w/ py2.6 on OS 10.4

2008-10-07 Thread Michael Droettboom
matplotlib 0.98.3 predates the release of Python 2.6, so it is 
unsupported in that combination.  There were recent changes made to 
matplotlib in SVN to make it (more) Python 2.6 compatible.  You may run 
into further trouble trying to get it to work with Python 2.6

That, however, doesn't seem to be the root of your compilation problem.

src/backend_agg.cpp:3:17: error: png.h: No such file or directory

...indicates that it can not find the headers for libpng.  Did you 
follow the instructions here:

http://ipython.scipy.org/moin/Py4Science/InstallationOSX

...particularly regarding installing pkgconfig?

If not, let us know where your libpng is installed.  You can try, as a 
hack, adding that directory to the list of the darwin directories at the 
top of setupext.py.

Cheers,
Mike

Nat Wilson wrote:
 (message was too long before, and bounced. trying again, having 
 abridged the terminal output)

 I've just installed python 2.6, and I'm having trouble compiling 
 matplotlib.

 The problem is generally the same whether I try to build it myself or 
 use easy_install.

 Here are my specs:
 Python 2.6
 matplotlib 0.98.3
 numpy 1.2.0

 on a Apple iBook G4, running OS 10.4.11.

 In the past, I've had no problems getting it working with Python 2.5, 
 although since then I've changed from tcl/tk 8.4 to tcl/tk 8.5.

 Here is the output in the terminal:

 ##:~/Desktop/matplotlib-0.98.3 natwilson$ python setup.py build
 /Users/natwilson/Desktop/matplotlib-0.98.3/setupext.py:67: 
 DeprecationWarning: the sets module is deprecated
   from sets import Set
 
 BUILDING MATPLOTLIB
 matplotlib: 0.98.3
 python: 2.6 (r26:66714, Oct  6 2008, 18:19:26)  [GCC 4.0.1
 (Apple Computer, Inc. build 5370)]
   platform: darwin

 REQUIRED DEPENDENCIES
  numpy: 1.2.0
  freetype2: found, but unknown version (no pkg-config)

 OPTIONAL BACKEND DEPENDENCIES
 libpng: found, but unknown version (no pkg-config)
 * Could not find 'libpng' headers in any of
 * '/usr/include', '/usr/X11R6/include', '.'
Tkinter: Tkinter: 65971, Tk: 8.5, Tcl: 8.5
   wxPython: no
 * wxPython not found
   Gtk+: no
 * Building for Gtk+ requires pygtk; you must 
 be able
 * to import gtk in your build/install 
 environment
 Qt: no
Qt4: no
  Cairo: no

 OPTIONAL DATE/TIMEZONE DEPENDENCIES
   datetime: present, version unknown
   dateutil: matplotlib will provide
   pytz: matplotlib will provide

 OPTIONAL USETEX DEPENDENCIES
 /Users/natwilson/Desktop/matplotlib-0.98.3/setupext.py:502: 
 DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
   stdin, stdout = os.popen4('dvipng -version')
 dvipng: no
 /Users/natwilson/Desktop/matplotlib-0.98.3/setupext.py:515: 
 DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
   stdin, stdout = os.popen4(command)
ghostscript: 8.62
 /Users/natwilson/Desktop/matplotlib-0.98.3/setupext.py:524: 
 DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
   stdin, stdout = os.popen4('latex -version')
  latex: 3.1415926
 /Users/natwilson/Desktop/matplotlib-0.98.3/setupext.py:536: 
 DeprecationWarning: os.popen4 is deprecated.  Use the subprocess module.
   stdin, stdout = os.popen4('pdftops -v')

 EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
  configobj: matplotlib will provide
   enthought.traits: no

 [Edit setup.cfg to suppress the above messages]
 
 running build
 running build_py
 creating build
 creating build/lib.macosx-10.3-ppc-2.6
 copying lib/pylab.py - build/lib.macosx-10.3-ppc-2.6
 copying lib/configobj.py - build/lib.macosx-10.3-ppc-2.6
 creating build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/__init__.py - 
 build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/_cm.py - build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/_mathtext_data.py - 
 build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/_pylab_helpers.py - 
 build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/afm.py - build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/artist.py - 
 build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/axes.py - build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/axes3d.py - 
 build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/axis.py - build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying lib/matplotlib/backend_bases.py - 
 build/lib.macosx-10.3-ppc-2.6/matplotlib
 copying 

Re: [Matplotlib-users] Can't seem to plot 2 horizontal lines on same plot

2008-10-07 Thread Michael Droettboom
pylab.show() takes no arguments.  The pylab interface is stateful, 
meaning you run a series of commands in order and it usually does the 
right thing, rather than passing the results of one function into 
another (in general).

Did you not get an exception when you ran your example?

The following works for me:

import pylab
x1 = pylab.arange(-10, 10, 0.01)
x2 = pylab.arange(  0, 10, 0.01)
f1 = [0 for e in x1]
f2 = [1 for e in x2]
pylab.plot(x1, f1, x2, f2)
pylab.show()



[EMAIL PROTECTED] wrote:
 I don't know what dumb thing I'm going but I can't seem to plot
 2 horizontal lines on the same plot!!!


 Why does this snippet give a *BLANK* plot when I run it?

 (Either line separately seems to be ok!?!?)

 import pylab
 x1 = pylab.arange(-10, 10, 0.01)
 x2 = pylab.arange(  0, 10, 0.01)
 f1 = [0 for e in x1]
 f2 = [1 for e in x2]
 pylab.show(pylab.plot(x1, f1, x2, f2))


 Chris

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] colorbar tick labeling

2008-10-07 Thread Michael Outhouse
I was wondering if it is possible to change the colorbar tick labeling in 
matplotlib from numeric to text. Essentially, I want the colorbar to be a 
qualitative indicator; in the jet scheme, I'd like blue to be labeled 
as 'unstable', green as 'neutral', and red as 'stable'. I can change it so I 
just show the underlying values - colorbar(ticks = (-1, 0, 1)), but I cannot 
change the the tick labels to text. Is there any way to accomplish this? 
Thanks in advance for any help.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Compilation problems on Fedora Core2.

2008-10-07 Thread Venkat Ramanan
Hi all,

Both the latest matplotlib (0.98.3) and the maintenance release (0.91.4) 
fail to compile for me with identical error msg.

I'm using Fedora Core 2, which I can't upgrade unfortunately.

I've installed python2.5.2,  numpy-1.1.1, pygtk-2.4 and they seem work ok.

The relevant line is,

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
-Wstrict-prototypes -fPIC -I/usr/include/libpng12 -I/usr/local/include 
-I/usr/include -I. -Isrc -Iswig -Iagg23/include -I. 
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
-I/usr/local/include -I/usr/include -I. -I/usr/include/pygtk-2.0 
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/pango-1.0 -I/usr/X11R6/include 
-I/usr/include/freetype2/config -I/data/opt/include/python2.5 -c 
src/_gtkagg.cpp -o build/temp.linux-i686-2.5/src/_gtkagg.o
In file included from /data/opt/include/python2.5/Python.h:8,
 from /usr/include/pygtk-2.0/pygobject.h:5,
 from src/_gtkagg.cpp:10:
/data/opt/include/python2.5/pyconfig.h:942:1: warning: _POSIX_C_SOURCE 
redefined
In file included from /usr/include/string.h:26,
 from /usr/include/c++/3.3.3/cstring:51,
 from src/_gtkagg.cpp:1:
/usr/include/features.h:132:1: warning: this is the location of the 
previous definition
In file included from src/_gtkagg.cpp:10:
/usr/include/pygtk-2.0/pygobject.h:140: error: syntax error before 
`typename'
/usr/include/pygtk-2.0/pygobject.h:147: error: syntax error before 
`typename'
error: command 'gcc' failed with exit status 1

Thanks for any help,
Venkat.

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Compilation problems on Fedora Core2.

2008-10-07 Thread Michael Droettboom
This is a known problem with old versions of pygtk.

See here:

http://osdir.com/ml/python.matplotlib.general/2004-11/msg00101.html

Cheers,
Mike

Venkat Ramanan wrote:
 Hi all,

 Both the latest matplotlib (0.98.3) and the maintenance release (0.91.4) 
 fail to compile for me with identical error msg.

 I'm using Fedora Core 2, which I can't upgrade unfortunately.

 I've installed python2.5.2,  numpy-1.1.1, pygtk-2.4 and they seem work ok.

 The relevant line is,

 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
 -Wstrict-prototypes -fPIC -I/usr/include/libpng12 -I/usr/local/include 
 -I/usr/include -I. -Isrc -Iswig -Iagg23/include -I. 
 -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
 -I/usr/local/include -I/usr/include -I. -I/usr/include/pygtk-2.0 
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 
 -I/usr/include/pango-1.0 -I/usr/X11R6/include 
 -I/usr/include/freetype2/config -I/data/opt/include/python2.5 -c 
 src/_gtkagg.cpp -o build/temp.linux-i686-2.5/src/_gtkagg.o
 In file included from /data/opt/include/python2.5/Python.h:8,
  from /usr/include/pygtk-2.0/pygobject.h:5,
  from src/_gtkagg.cpp:10:
 /data/opt/include/python2.5/pyconfig.h:942:1: warning: _POSIX_C_SOURCE 
 redefined
 In file included from /usr/include/string.h:26,
  from /usr/include/c++/3.3.3/cstring:51,
  from src/_gtkagg.cpp:1:
 /usr/include/features.h:132:1: warning: this is the location of the 
 previous definition
 In file included from src/_gtkagg.cpp:10:
 /usr/include/pygtk-2.0/pygobject.h:140: error: syntax error before 
 `typename'
 /usr/include/pygtk-2.0/pygobject.h:147: error: syntax error before 
 `typename'
 error: command 'gcc' failed with exit status 1

 Thanks for any help,
 Venkat.

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Compilation problems on Fedora Core2.

2008-10-07 Thread Venkat Ramanan
Thanks for the quick and helpful pointer.

I have a related question not specifically matplotlib related.

I installed pygtk-2.4 using python setup.py install. Is there an easy 
way to remove it from the python install?

Thanks,
Venkat.

Michael Droettboom wrote:
 This is a known problem with old versions of pygtk.

 See here:

 http://osdir.com/ml/python.matplotlib.general/2004-11/msg00101.html

 Cheers,
 Mike

 Venkat Ramanan wrote:
 Hi all,

 Both the latest matplotlib (0.98.3) and the maintenance release 
 (0.91.4) fail to compile for me with identical error msg.

 I'm using Fedora Core 2, which I can't upgrade unfortunately.

 I've installed python2.5.2,  numpy-1.1.1, pygtk-2.4 and they seem 
 work ok.

 The relevant line is,

 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
 -Wstrict-prototypes -fPIC -I/usr/include/libpng12 
 -I/usr/local/include -I/usr/include -I. -Isrc -Iswig -Iagg23/include 
 -I. -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
 -I/usr/local/include -I/usr/include -I. -I/usr/include/pygtk-2.0 
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include 
 -I/usr/include/freetype2/config -I/data/opt/include/python2.5 -c 
 src/_gtkagg.cpp -o build/temp.linux-i686-2.5/src/_gtkagg.o
 In file included from /data/opt/include/python2.5/Python.h:8,
  from /usr/include/pygtk-2.0/pygobject.h:5,
  from src/_gtkagg.cpp:10:
 /data/opt/include/python2.5/pyconfig.h:942:1: warning: 
 _POSIX_C_SOURCE redefined
 In file included from /usr/include/string.h:26,
  from /usr/include/c++/3.3.3/cstring:51,
  from src/_gtkagg.cpp:1:
 /usr/include/features.h:132:1: warning: this is the location of the 
 previous definition
 In file included from src/_gtkagg.cpp:10:
 /usr/include/pygtk-2.0/pygobject.h:140: error: syntax error before 
 `typename'
 /usr/include/pygtk-2.0/pygobject.h:147: error: syntax error before 
 `typename'
 error: command 'gcc' failed with exit status 1

 Thanks for any help,
 Venkat.

 - 

 This SF.Net email is sponsored by the Moblin Your Move Developer's 
 challenge
 Build the coolest Linux based applications with Moblin SDK  win 
 great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the 
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Compilation problems on Fedora Core2.

2008-10-07 Thread Venkat Ramanan
Sorry, I seem to have installed pygtk by
configure --prefix=/data/opt
make
make install

Bye,
Venkat.

Venkat Ramanan wrote:
 Thanks for the quick and helpful pointer.

 I have a related question not specifically matplotlib related.

 I installed pygtk-2.4 using python setup.py install. Is there an easy 
 way to remove it from the python install?

 Thanks,
 Venkat.

 Michael Droettboom wrote:
   
 This is a known problem with old versions of pygtk.

 See here:

 http://osdir.com/ml/python.matplotlib.general/2004-11/msg00101.html

 Cheers,
 Mike

 Venkat Ramanan wrote:
 
 Hi all,

 Both the latest matplotlib (0.98.3) and the maintenance release 
 (0.91.4) fail to compile for me with identical error msg.

 I'm using Fedora Core 2, which I can't upgrade unfortunately.

 I've installed python2.5.2,  numpy-1.1.1, pygtk-2.4 and they seem 
 work ok.

 The relevant line is,

 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall 
 -Wstrict-prototypes -fPIC -I/usr/include/libpng12 
 -I/usr/local/include -I/usr/include -I. -Isrc -Iswig -Iagg23/include 
 -I. -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
 -I/usr/local/include -I/usr/include -I. -I/usr/include/pygtk-2.0 
 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include 
 -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include 
 -I/usr/include/freetype2/config -I/data/opt/include/python2.5 -c 
 src/_gtkagg.cpp -o build/temp.linux-i686-2.5/src/_gtkagg.o
 In file included from /data/opt/include/python2.5/Python.h:8,
  from /usr/include/pygtk-2.0/pygobject.h:5,
  from src/_gtkagg.cpp:10:
 /data/opt/include/python2.5/pyconfig.h:942:1: warning: 
 _POSIX_C_SOURCE redefined
 In file included from /usr/include/string.h:26,
  from /usr/include/c++/3.3.3/cstring:51,
  from src/_gtkagg.cpp:1:
 /usr/include/features.h:132:1: warning: this is the location of the 
 previous definition
 In file included from src/_gtkagg.cpp:10:
 /usr/include/pygtk-2.0/pygobject.h:140: error: syntax error before 
 `typename'
 /usr/include/pygtk-2.0/pygobject.h:147: error: syntax error before 
 `typename'
 error: command 'gcc' failed with exit status 1

 Thanks for any help,
 Venkat.

 - 

 This SF.Net email is sponsored by the Moblin Your Move Developer's 
 challenge
 Build the coolest Linux based applications with Moblin SDK  win 
 great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the 
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   
   


 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Compilation problems on Fedora Core2.

2008-10-07 Thread John Hunter
On Tue, Oct 7, 2008 at 11:32 AM, Michael Droettboom [EMAIL PROTECTED] wrote:
 This is a known problem with old versions of pygtk.

 See here:

 http://osdir.com/ml/python.matplotlib.general/2004-11/msg00101.html


See also this FAQ:

http://matplotlib.sourceforge.net/faq.html#PYGTK24

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] compiling problems with py2.6, os 10.4

2008-10-07 Thread Nat Wilson

I don't think so - how would I find out?
I haven't explicitly installed anything like that myself, so unless  
it's sipped with OS X, or was installed with some other package, I  
shouldn't have it.


Nat

On Oct 7, 2008, at 3:06 PM, Johann Cohen-Tanugi wrote:
I think that the culprit is :
src/backend_agg.cpp:3:17: error: png.h: No such file or directory
and is in par with :
   libpng: found, but unknown version (no pkg-config)
   * Could not find 'libpng' headers in any of
   * '/usr/include', '/usr/X11R6/include', '.'
Do you have the package libpng-devel, whatever the equivalent in Mac?
Johann-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't seem to plot 2 horizontal lines on same plot

2008-10-07 Thread chris
On Tue, Oct 07, 2008 at 12:54:49PM +0200, Johann Rohwer wrote:
 The autoscaling feature sets the y limits to [0,1] which means that
 your lines are falling on the bottom and top x-axis which hides them.
 Rescaling the y-axis will make the lines visible, e.g.

 pylab.ylim(-1,2)

Thank you very much.  That did it.

cs

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't seem to plot 2 horizontal lines on same plot

2008-10-07 Thread chris
On Tue, Oct 07, 2008 at 08:19:39AM -0400, Michael Droettboom wrote:
 Did you not get an exception when you ran your example?

 The following works for me:

 import pylab
 x1 = pylab.arange(-10, 10, 0.01)
 x2 = pylab.arange(  0, 10, 0.01)
 f1 = [0 for e in x1]
 f2 = [1 for e in x2]
 pylab.plot(x1, f1, x2, f2)
 pylab.show()

The lines aren't visible when I do it.  No exceptions given.

cs

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Animation and imshow

2008-10-07 Thread Michael
loop through the data and call clf():

from pylab import *
from numpy import *

ion()
hold(False)

frame1 = zeros((200, 200))
frame1[20:40, 20:40] = 255

frame2 = zeros((200, 200))
frame2[20:40, 30:50] = 255

frame3 = zeros((200, 200))
frame3[20:40, 40:60] = 255

frame4 = zeros((200, 200))
frame4[20:40, 50:70] = 255

frame5 = zeros((200, 200))
frame5[20:40, 50:70] = 255

data=[frame1,frame2,frame3,frame4,frame5]

for frame in data:
m=imshow(frame)
m.set_data(frame)
clf()
show()
#close() 

 Message: 2
 Date: Tue, 7 Oct 2008 15:10:30 +0200
 From: Alexander Borghgraef [EMAIL PROTECTED]
 Subject: [Matplotlib-users] Animation and imshow
 To: matplotlib-users@lists.sourceforge.net
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1
 
 I'm trying to figure out how to do animated graphics in pylab using
 imshow, so I made this little 'hello world' equivalent showing a
 moving square over two frames.
 Problem is I have to call draw twice to refresh the image. Anyone can
 explain why this is so (and how to do this more elegantly)? This is
 the code:
 
 from pylab import *
 from numpy import *
 
 ion()
 hold(False)
 
 frame1 = zeros((200, 200))
 frame1[20:40, 20:40] = 255
 
 frame2 = zeros((200, 200))
 frame2[20:40, 30:50] = 255
 
 m = imshow(frame1)
 draw()   # shows frame1
 m.set_data(frame2)
 draw()   # still shows frame1!!!
 draw()   # and now it shows frame2!??
 
 
 -- 
 Alex Borghgraef
 
 

-- 
When you think of the long and gloomy history of man, you will find far
more hideous crimes have been committed in the name of obedience than
have been committed in the name of rebellion. C.P.Snow,
Either-Or (1961)


signature.asc
Description: This is a digitally signed message part
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] More digits on the plot window coordinate display?

2008-10-07 Thread Buchholz, Greg
Is there a way to display more digits on the cursor readout in the
lower right hand corner of the plot window?  Right now my setup is only
showing three digits to the right of the decimal point, which isn't
enough when I'm zoomed way in.  If that description isn't good enough to
describe what I mean, take a look at the following screenshot:

 

http://sleepingsquirrel.org/matplotlib/low-resolution-coords.PNG

 

...or maybe I'm looking for a way to trace the individual displayed
waveforms with the cursor, like on a digital oscilloscope, to ease in
the taking of measurements.  Any thoughts?

 

Thanks,

 

Greg 

 

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] More digits on the plot window coordinate display?

2008-10-07 Thread Eric Firing
Buchholz, Greg wrote:
 Is there a way to display more digits on the cursor readout in the 
 lower right hand corner of the plot window?  Right now my setup is only 
 showing three digits to the right of the decimal point, which isn’t 
 enough when I’m zoomed way in.  If that description isn’t good enough to 
 describe what I mean, take a look at the following screenshot:

Something like this (pylab-style example):

def fmt(x):
 return %10.5f % x

ax = gca()
ax.fmt_xdata = fmt
ax.fmt_ydata = fmt

If the fmt_xdata and/or fmt_ydata attributes of the axes object are 
callable, they are used to format the cursor readout.

Eric

 
  
 
 http://sleepingsquirrel.org/matplotlib/low-resolution-coords.PNG
 
  
 
 …or maybe I’m looking for a way to trace the individual displayed 
 waveforms with the cursor, like on a digital oscilloscope, to ease in 
 the taking of measurements.  Any thoughts?
 
  
 
 Thanks,
 
  
 
 Greg
 
  
 
 
 
 
 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
 Build the coolest Linux based applications with Moblin SDK  win great prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 
 
 
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users