Re: [Matplotlib-users] nonlinear axes for imshow

2009-10-13 Thread thkoe002

Hi Eric,

thanks for the help, but this doesn't do what I want.
I don't want to change the image in any way, I just want the axes to have a
decreasing spacing. I made a small example with ms paint to clarify.

http://www.nabble.com/file/p25867951/axes.png 

I could do this with ax.set_xticks() and ax.set_xticklabels(), but I was
wondering if there is a way that also changes the whole coordinate system
and not only the labeling. For example, the position of the mouse pointer
will not be shown anymore when I use custom ax.set_xticklabels().

Cheers

Thomas



efiring wrote:
> 
> thkoe002 wrote:
>> Hello,
>> 
>> I have the following problem. I want the axes (only the y-axis, to be
>> exact)
>> of a imshow() graph to be nonlinear. By default, the axis goes linearily
>> from 0 to (number of pixels). With the [extent] keyword, I can change
>> that
>> to going linearly from (arbitrary start) to (arbitrary end). Now, I'd
>> like
>> the axis to be dependend on a (bijective) arbitrary function, for example
>> y=p^2 (when p is the pixel number and y the y-axis coordinate).
>> How can I achieve this?
>> Thanks a lot, cheers
>> 
>> Thomas
> 
> See
> http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html
> 
> Eric
> 
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/nonlinear-axes-for-imshow-tp25853828p25867951.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How to setup zdata on Line3D ?

2009-10-13 Thread Cédrick FAURY
Hello,
I can't find the way to change the "zdata" on a Line3D object. (mpl 99.1)
I would like to use setp ...

Thanks by advance
Cédrick

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] nonlinear axes for imshow

2009-10-13 Thread Jae-Joon Lee
On Tue, Oct 13, 2009 at 2:48 AM, thkoe002  wrote:
>
> Hi Eric,
>
> thanks for the help, but this doesn't do what I want.
> I don't want to change the image in any way, I just want the axes to have a
> decreasing spacing. I made a small example with ms paint to clarify.
>
> http://www.nabble.com/file/p25867951/axes.png
>
> I could do this with ax.set_xticks() and ax.set_xticklabels(), but I was
> wondering if there is a way that also changes the whole coordinate system
> and not only the labeling. For example, the position of the mouse pointer
> will not be shown anymore when I use custom ax.set_xticklabels().
>

It depends on how far you want to go.

* Manually setting ticks is a easiest solution, I guess.

* The next step would be to create your custom tick locator & formatter

http://matplotlib.sourceforge.net/api/ticker_api.html

While this is not that difficult, you will need to spend some time.

* axes_grid toolkit has limited support for arbitrary coordinate system.

http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html

* create your own projection.

http://matplotlib.sourceforge.net/devel/add_new_projection.html

Unless you're familiar with matplotlib and some of it internals, the
last two options is not recommended.
Regards,

-JJ


> Cheers
>
> Thomas
>
>
>
> efiring wrote:
>>
>> thkoe002 wrote:
>>> Hello,
>>>
>>> I have the following problem. I want the axes (only the y-axis, to be
>>> exact)
>>> of a imshow() graph to be nonlinear. By default, the axis goes linearily
>>> from 0 to (number of pixels). With the [extent] keyword, I can change
>>> that
>>> to going linearly from (arbitrary start) to (arbitrary end). Now, I'd
>>> like
>>> the axis to be dependend on a (bijective) arbitrary function, for example
>>> y=p^2 (when p is the pixel number and y the y-axis coordinate).
>>> How can I achieve this?
>>> Thanks a lot, cheers
>>>
>>> Thomas
>>
>> See
>> http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html
>>
>> Eric
>>
>> --
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/nonlinear-axes-for-imshow-tp25853828p25867951.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draw twin axes below main axes

2009-10-13 Thread Jae-Joon Lee
On Tue, Oct 13, 2009 at 2:52 AM, Georg Brandl  wrote:
> BTW, from Gnuplot I missed the ability to press "q" to close a figure window
> and wrote a custom key handler to do that; would it make sense to add that
> by default?

gui and event handling is not my field, but as far as it is easily
customizable, I guess it should be good to be added. I recommend you
to post your patch (against the lastest svn) on the dev-list and ask
how other developers think.

Regards,

-JJ

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] unclutter the axis

2009-10-13 Thread Jae-Joon Lee
On Mon, Oct 12, 2009 at 11:45 AM, Ernest Adrogué  wrote:
> hi,
>
> is there a way to put a label every two o three ticks,
> instead of putting it on every tick?

I personally think it is best to use major ticks with labels and minor
ticks w/o labels.

>
> the following works but it's a little cumbersome:
>
> ax.set_yticklabels([pos % 2 != 0 and '%.2f' % num or ''
>    for pos, num in enumerate(ax.get_yticks())])

If you need more than that, consider using a custom tick formatter.

-JJ

>
>
> cheers,
>
> Ernest
>
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Little issue with blitting technique

2009-10-13 Thread Jae-Joon Lee
I haven't tested it with qt4, but with gtk, add_axes DOES work.

So, can you try other backends and see if they work?

And, I believe that add_subplot -> add_axes is a only change you made?

Unless the problem is persistent among other backends, I hope other
developers who use qt4 backend step in and help.

Regards,

-JJ


On Thu, Oct 8, 2009 at 11:30 AM, Laurent Dufrechou
 wrote:
> Hello,
>
>
>
> I’ve just discovered blitting technique to improve performances.
>
> I’m using this example
> http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4.html
>
>
>
> I encounter an issue if instead of using subplot I use add_axes method to
> hand define where I want my plot.
>
> In this case blitting is no more working like if restore_region was not
> restoring context…
>
>
>
> def __init__(self):
>
>     FigureCanvas.__init__(self, Figure())
>
>
>
>     #self.ax = self.figure.add_subplot(111)
>
>     self.ax = self.figure.add_axes([0.1,0.1,0.8,0.2])
>
>
>
> Any idea why in this case the example given is not working?
>
>
>
> Cheers,
>
> Laurent
>
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Little issue with blitting technique

2009-10-13 Thread Laurent Dufrechou
Hello,

I've tested so far with wx and QT4 backend.
The two are buggy.
Easy way to reproduce the bug (another way I mean)

ax = p.subplot(212)
ax2 = p.subplot(211)

and the two backends got the same error.

Note that I'm under windows. I'll try under linux tonight just to check.
I'll also try gtk backend as you suggest.

Update in next email :)

> -Message d'origine-
> De : Jae-Joon Lee [mailto:lee.j.j...@gmail.com]
> Envoyé : mardi 13 octobre 2009 18:36
> À : Laurent Dufrechou
> Cc : matplotlib-users@lists.sourceforge.net
> Objet : Re: [Matplotlib-users] Little issue with blitting technique
> 
> I haven't tested it with qt4, but with gtk, add_axes DOES work.
> 
> So, can you try other backends and see if they work?
> 
> And, I believe that add_subplot -> add_axes is a only change you made?
> 
> Unless the problem is persistent among other backends, I hope other
> developers who use qt4 backend step in and help.
> 
> Regards,
> 
> -JJ
> 
> 
> On Thu, Oct 8, 2009 at 11:30 AM, Laurent Dufrechou
>  wrote:
> > Hello,
> >
> >
> >
> > I’ve just discovered blitting technique to improve performances.
> >
> > I’m using this example
> >
> http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4
> .html
> >
> >
> >
> > I encounter an issue if instead of using subplot I use add_axes
> method to
> > hand define where I want my plot.
> >
> > In this case blitting is no more working like if restore_region was
> not
> > restoring context…
> >
> >
> >
> > def __init__(self):
> >
> >     FigureCanvas.__init__(self, Figure())
> >
> >
> >
> >     #self.ax = self.figure.add_subplot(111)
> >
> >     self.ax = self.figure.add_axes([0.1,0.1,0.8,0.2])
> >
> >
> >
> > Any idea why in this case the example given is not working?
> >
> >
> >
> > Cheers,
> >
> > Laurent
> >
> > -
> -
> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart
> your
> > developing skills, take BlackBerry mobile applications to market and
> stay
> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> > http://p.sf.net/sfu/devconference
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Installing matplotlib on mac os 10.6 (Snow Leopard)?

2009-10-13 Thread William Carithers
I've not been able to find a successful way to install matplotlib since
upgrading to OS 10.6. There doesn't seem to be an egg for it. Easy_install
matplotlib finds an old version (0.91) that is not compatible with the new
numpy supplied by Apple. Easy_install matplotlib-0.99.1 can't find it.
Likewise, easy_install
http://sourceforge.net/projects/matplotlib/matplotlib-0.99.1/matplotlib-0.99
.1.1.tar.gz doesn't find it.

I tried downloading the gzipped tar file, then python setup install , but I
got a compile error. I'm now stumped. Any ideas?

Thanks,
Bill Carithers



--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

I'm pretty sure I have all the required minimal dependencies installed, but get 
an error when I sudo python setup.py build.  Any thoughts?  I can start python 
and import Tkinter without an error.  So I don't know why it's not finding it.

[code]
sudo python setup.py build

BUILDING MATPLOTLIB 
matplotlib: 0.99.1.1
python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)  [GCC
4.3.3]  
  platform: linux2  

REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.27
   Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.   
* You may need to define DISPLAY for Tk to work so 
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages. 
  wxPython: 2.8.9.1 
* WxAgg extension not required for wxPython >= 2.8  
pkg-config: looking for pygtk-2.0 gtk+-2.0  
* Package pygtk-2.0 was not found in the pkg-config 
* search path. Perhaps you should add the directory 
* containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH  
* environment variable No package 'pygtk-2.0' found 
* Package gtk+-2.0 was not found in the pkg-config  
* search path. Perhaps you should add the directory 
* containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH   
* environment variable No package 'gtk+-2.0' found  
* You may need to install 'dev' package(s) to   
* provide header files. 
  Gtk+: no  
* Could not find Gtk+ headers in any of 
* '/usr/local/include', '/usr/include', '.' 
   Mac OS X native: no  
Qt: no  
   Qt4: no  
 Cairo: 1.4.12  

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

OPTIONAL USETEX DEPENDENCIES
dvipng: no
   ghostscript: 8.64
 latex: 3.141592
   pdftops: 0.10.5

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 
'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 
'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 
'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._tkagg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
-I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/include 
-I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc -Iagg24/include 
-I. -I/usr/lib/python2.6/dist-packages/numpy/core/include 
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
-I/usr/include/python2.6 -c src/_tkagg.cpp -o 
build/temp.linux-i686-2.6/src/_tkagg.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from /usr/include/c++/4.3/ext/hash_map:64,
 from ./CXX/Extensions.hxx:68,
 from src/_backend_agg.h:8,
 from src/_tkagg.cpp:

Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

OK, I got by the tk part by installing tk-dev, but now get:
[code]
sudo python setup.py build  
  

   
BUILDING MATPLOTLIB 
   
matplotlib: 0.99.1.1
   
python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)  [GCC
   
4.3.3]  
   
  platform: linux2  
   

REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.27
   Tkinter: Tkinter: 70220, Tk: 8.5, Tcl: 8.5
  wxPython: 2.8.9.1  
* WxAgg extension not required for wxPython >= 2.8
pkg-config: looking for pygtk-2.0 gtk+-2.0
* Package pygtk-2.0 was not found in the pkg-config
* search path. Perhaps you should add the directory
* containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH 
* environment variable No package 'pygtk-2.0' found
* Package gtk+-2.0 was not found in the pkg-config 
* search path. Perhaps you should add the directory
* containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH  
* environment variable No package 'gtk+-2.0' found 
* You may need to install 'dev' package(s) to  
* provide header files.
  Gtk+: no 
* Could not find Gtk+ headers in any of
* '/usr/local/include', '/usr/include', '.'
   Mac OS X native: no 
Qt: no 
   Qt4: no 
 Cairo: 1.4.12 

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

OPTIONAL USETEX DEPENDENCIES
dvipng: no
   ghostscript: 8.64
 latex: 3.141592
   pdftops: 0.10.5

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 
'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 
'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 
'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._tkagg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
-I/usr/include/tcl8.4 -I/usr/include/tcl8.4 -I/usr/local/include -I/usr/include 
-I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc -Iagg24/include 
-I. -I/usr/lib/python2.6/dist-packages/numpy/core/include 
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
-I/usr/include/python2.6 -c src/_tkagg.cpp -o 
build/temp.linux-i686-2.6/src/_tkagg.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from /usr/include/c++/4.3/ext/hash_map:64,
 from ./CXX/Extensions.hxx:68,
 from src/_backend_agg.h:8,
 from src/_tkagg.cpp:18:
/usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated.
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-funct

Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread Jeff Whitaker
KURT PETERS wrote:
> I'm pretty sure I have all the required minimal dependencies 
> installed, but get an error when I sudo python setup.py build.  Any 
> thoughts?  I can start python and import Tkinter without an error.  So 
> I don't know why it's not finding it.
>
> [code]
> sudo python setup.py build
> 
> BUILDING 
> MATPLOTLIB
> matplotlib: 
> 0.99.1.1   
> python: 2.6.2 (release26-maint, Apr 19 2009, 
> 01:56:41)  [GCC
> 
> 4.3.3] 
>   platform: 
> linux2 
>
> REQUIRED DEPENDENCIES
>  numpy: 1.2.1
>  freetype2: 9.20.3
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.27
>Tkinter: no   
> * Using default library and include 
> directories for
> * Tcl and Tk because a Tk window failed to 
> open.  
> * You may need to define DISPLAY for Tk to 
> work so
> * that setup can determine where your 
> libraries are
> * located. Tkinter present, but header files 
> are not
> * found. You may need to install 
> development   
> * 
> packages.
>   wxPython: 
> 2.8.9.1
> * WxAgg extension not required for wxPython >= 
> 2.8 
> pkg-config: looking for pygtk-2.0 
> gtk+-2.0 
> * Package pygtk-2.0 was not found in the 
> pkg-config
> * search path. Perhaps you should add the 
> directory
> * containing `pygtk-2.0.pc' to the 
> PKG_CONFIG_PATH 
> * environment variable No package 'pygtk-2.0' 
> found
> * Package gtk+-2.0 was not found in the 
> pkg-config 
> * search path. Perhaps you should add the 
> directory
> * containing `gtk+-2.0.pc' to the 
> PKG_CONFIG_PATH  
> * environment variable No package 'gtk+-2.0' 
> found 
> * You may need to install 'dev' package(s) 
> to  
> * provide header 
> files.
>   Gtk+: 
> no 
> * Could not find Gtk+ headers in any 
> of
> * '/usr/local/include', '/usr/include', 
> '.'
>Mac OS X native: 
> no 
> Qt: 
> no 
>Qt4: 
> no 
>  Cairo: 
> 1.4.12 
>
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>   datetime: present, version unknown
>   dateutil: matplotlib will provide
>   pytz: matplotlib will provide
> adding pytz
>
> OPTIONAL USETEX DEPENDENCIES
> dvipng: no
>ghostscript: 8.64
>  latex: 3.141592
>pdftops: 0.10.5
>
> [Edit setup.cfg to suppress the above messages]
> 
> pymods ['pylab']
> packages ['matplotlib', 'matplotlib.backends', 
> 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 
> 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 
> 'matplotlib.numerix', 'matplotlib.numerix.mlab', 
> 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 
> 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 
> 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
> running build
> running build_py
> copying lib/matplotlib/mpl-data/matplotlibrc -> 
> build/lib.linux-i686-2.6/matplotlib/mpl-data
> copying lib/matplotlib/mpl-data/matplotlib.conf -> 
> build/lib.linux-i686-2.6/matplotlib/mpl-data
> running build_ext
> building 'matplotlib.backends._tkagg' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
> -I/usr/local/include -I/usr/local/include -I/usr/local/include 
> -I/usr/include -I. 
> -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc 
> -Iagg24/include -I. 
> -I/usr/lib/python2.6/dist-packages/numpy/core/include 
> -I/usr/include/freetype2 -I/usr/local/include -I/usr/include -I. 
> -I/usr/include/python2.6 -c src/_tkagg.cpp -o 
> build/temp.linux-i686-2.6/src/_tkagg.o
> cc1plus: warning: command lin

Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread Eric Firing
KURT PETERS wrote:
> OK, I got by the tk part by installing tk-dev, but now get:
[...]
> build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib 
> -L/usr/local/lib -ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ 
> -lm -o build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
> /usr/bin/ld: cannot find -ltk8.5
> collect2: ld returned 1 exit status
> error: command 'g++' failed with exit status 1
> [/code]


What does

ls /usr/lib/libtk8.5*

show?

Eric

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Little issue with blitting technique

2009-10-13 Thread Laurent Dufréchou
I've just installer GTK on windows + tested your file and it works...
Moreover, I've modified the source to make the code use QT4Agg instead of GTK 
and the bug does not appears.
So I think it is more an issue of misusing bliting technique in other examples.
(still your gtk example is more beautiful but 10 times slower than other 
examples, so is blitting really working in this case ?)

I'll dig this a little more but any idea welcome :)

> -Message d'origine-
> De : Laurent Dufrechou [mailto:ldufrec...@marport.com]
> Envoyé : mardi 13 octobre 2009 19:02
> À : Jae-Joon Lee
> Cc : matplotlib-users@lists.sourceforge.net
> Objet : Re: [Matplotlib-users] Little issue with blitting technique
> 
> Hello,
> 
> I've tested so far with wx and QT4 backend.
> The two are buggy.
> Easy way to reproduce the bug (another way I mean)
> 
> ax = p.subplot(212)
> ax2 = p.subplot(211)
> 
> and the two backends got the same error.
> 
> Note that I'm under windows. I'll try under linux tonight just to
> check.
> I'll also try gtk backend as you suggest.
> 
> Update in next email :)
> 
> > -Message d'origine-
> > De : Jae-Joon Lee [mailto:lee.j.j...@gmail.com]
> > Envoyé : mardi 13 octobre 2009 18:36
> > À : Laurent Dufrechou
> > Cc : matplotlib-users@lists.sourceforge.net
> > Objet : Re: [Matplotlib-users] Little issue with blitting technique
> >
> > I haven't tested it with qt4, but with gtk, add_axes DOES work.
> >
> > So, can you try other backends and see if they work?
> >
> > And, I believe that add_subplot -> add_axes is a only change you
> made?
> >
> > Unless the problem is persistent among other backends, I hope other
> > developers who use qt4 backend step in and help.
> >
> > Regards,
> >
> > -JJ
> >
> >
> > On Thu, Oct 8, 2009 at 11:30 AM, Laurent Dufrechou
> >  wrote:
> > > Hello,
> > >
> > >
> > >
> > > I’ve just discovered blitting technique to improve performances.
> > >
> > > I’m using this example
> > >
> >
> http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4
> > .html
> > >
> > >
> > >
> > > I encounter an issue if instead of using subplot I use add_axes
> > method to
> > > hand define where I want my plot.
> > >
> > > In this case blitting is no more working like if restore_region was
> > not
> > > restoring context…
> > >
> > >
> > >
> > > def __init__(self):
> > >
> > > FigureCanvas.__init__(self, Figure())
> > >
> > >
> > >
> > > #self.ax = self.figure.add_subplot(111)
> > >
> > > self.ax = self.figure.add_axes([0.1,0.1,0.8,0.2])
> > >
> > >
> > >
> > > Any idea why in this case the example given is not working?
> > >
> > >
> > >
> > > Cheers,
> > >
> > > Laurent
> > >
> > > ---
> --
> > -
> > > Come build with us! The BlackBerry(R) Developer Conference in SF,
> CA
> > > is the only developer event you need to attend this year. Jumpstart
> > your
> > > developing skills, take BlackBerry mobile applications to market
> and
> > stay
> > > ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> > > http://p.sf.net/sfu/devconference
> > > ___
> > > Matplotlib-users mailing list
> > > Matplotlib-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > >
> > >
> ---
> ---
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] [Solved] Little issue with blitting technique

2009-10-13 Thread Laurent Dufréchou
Hey, coparing on how GTK2 example is done I've seen a difference between the 
two!

In QT4Agg example and WX example the code use:

canvas.copy_from_bbox(ax.bbox)
replacing all occurrence of ax.bbox with ax.get_figure().bbox solved all the 
issue I add.

Perhaps we should correct the examples.
I can send you the good working example if you want.

Cheers,
Laurent


> -Message d'origine-
> De : Laurent Dufrechou [mailto:ldufrec...@marport.com]
> Envoyé : mardi 13 octobre 2009 19:02
> À : Jae-Joon Lee
> Cc : matplotlib-users@lists.sourceforge.net
> Objet : Re: [Matplotlib-users] Little issue with blitting technique
> 
> Hello,
> 
> I've tested so far with wx and QT4 backend.
> The two are buggy.
> Easy way to reproduce the bug (another way I mean)
> 
> ax = p.subplot(212)
> ax2 = p.subplot(211)
> 
> and the two backends got the same error.
> 
> Note that I'm under windows. I'll try under linux tonight just to
> check.
> I'll also try gtk backend as you suggest.
> 
> Update in next email :)
> 
> > -Message d'origine-
> > De : Jae-Joon Lee [mailto:lee.j.j...@gmail.com]
> > Envoyé : mardi 13 octobre 2009 18:36
> > À : Laurent Dufrechou
> > Cc : matplotlib-users@lists.sourceforge.net
> > Objet : Re: [Matplotlib-users] Little issue with blitting technique
> >
> > I haven't tested it with qt4, but with gtk, add_axes DOES work.
> >
> > So, can you try other backends and see if they work?
> >
> > And, I believe that add_subplot -> add_axes is a only change you
> made?
> >
> > Unless the problem is persistent among other backends, I hope other
> > developers who use qt4 backend step in and help.
> >
> > Regards,
> >
> > -JJ
> >
> >
> > On Thu, Oct 8, 2009 at 11:30 AM, Laurent Dufrechou
> >  wrote:
> > > Hello,
> > >
> > >
> > >
> > > I’ve just discovered blitting technique to improve performances.
> > >
> > > I’m using this example
> > >
> >
> http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4
> > .html
> > >
> > >
> > >
> > > I encounter an issue if instead of using subplot I use add_axes
> > method to
> > > hand define where I want my plot.
> > >
> > > In this case blitting is no more working like if restore_region was
> > not
> > > restoring context…
> > >
> > >
> > >
> > > def __init__(self):
> > >
> > > FigureCanvas.__init__(self, Figure())
> > >
> > >
> > >
> > > #self.ax = self.figure.add_subplot(111)
> > >
> > > self.ax = self.figure.add_axes([0.1,0.1,0.8,0.2])
> > >
> > >
> > >
> > > Any idea why in this case the example given is not working?
> > >
> > >
> > >
> > > Cheers,
> > >
> > > Laurent
> > >
> > > ---
> --
> > -
> > > Come build with us! The BlackBerry(R) Developer Conference in SF,
> CA
> > > is the only developer event you need to attend this year. Jumpstart
> > your
> > > developing skills, take BlackBerry mobile applications to market
> and
> > stay
> > > ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> > > http://p.sf.net/sfu/devconference
> > > ___
> > > Matplotlib-users mailing list
> > > Matplotlib-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > >
> > >
> ---
> ---
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

Getting closer...  I'm going to post the sum total of "apt-get installs"  I had 
to do to get matplotlib installed when I get it working (prelim. is at the end 
of this message).

I'm thinking on this one, something with ltk in it, but none of these look 
promising:
[code]
apt-cache search tk | grep "ltk"
fltk1.1-games - Fast Light Toolkit - example games: checkers, sudoku
freepops-updater-fltk - Graphical interface for the freepops updater engine
hfsutils-tcltk - Tcl/Tk interfaces for reading and writing Macintosh volumes
libtcltk-ruby - Tcl/Tk interface for Ruby
sufary-tcltk - Tcl/Tk interface for SUFARY
mgltools-opengltk - opengltk python extension
fltk1.1-doc - Fast Light Toolkit - documentation
libfltk1.1 - Fast Light Toolkit - shared libraries
libfltk1.1-dbg - Fast Light Toolkit - shared libraries with debugging symbols
libfltk1.1-dev - Fast Light Toolkit - development files
libtcltk-ruby1.8 - Tcl/Tk interface for Ruby 1.8
libtcltk-ruby1.9 - Tcl/Tk interface for Ruby 1.9
[/code]

Here's what's in my /usr/lib (for libtk8.5*) directory:
[code]
$ ls /usr/lib/libtk8.5*
/usr/lib/libtk8.5.so.0
[/code]
  Here's the latest error message:
[code]

BUILDING MATPLOTLIB 
matplotlib: 0.99.1.1
python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)  [GCC
4.3.3]  
  platform: linux2  

REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.27
   Tkinter: Tkinter: 70220, Tk: 8.5, Tcl: 8.5
  wxPython: 2.8.9.1  
* WxAgg extension not required for wxPython >= 2.8
pkg-config: looking for pygtk-2.0 gtk+-2.0
* Package pygtk-2.0 was not found in the pkg-config
* search path. Perhaps you should add the directory
* containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH 
* environment variable No package 'pygtk-2.0' found
* Package gtk+-2.0 was not found in the pkg-config
* search path. Perhaps you should add the directory
* containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH
* environment variable No package 'gtk+-2.0' found
* You may need to install 'dev' package(s) to
* provide header files.
  Gtk+: no
* Could not find Gtk+ headers in any of
* '/usr/local/include', '/usr/include', '.'
   Mac OS X native: no
Qt: no
   Qt4: no
 Cairo: 1.4.12

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

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.11
   ghostscript: 8.64
 latex: 3.141592
   pdftops: 0.10.5

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 
'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 
'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 
'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._tkagg' extension
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions 
build/temp.linux-i686-2.6/src/agg_py_transforms.o 
build/temp.linux-i686-2.6/src/_tkagg.o 
build/temp.linux-i686-2.6/CXX/cxx_extensions.o 
build/temp.linux-i686-2.6/CXX/cxxsupport.o 
build/temp.linux-i686-2.6/CXX/IndirectPythonInterface.o 
build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib 
-ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o 
build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
/usr/bin/ld: cannot find -ltk8.5
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
[/code]


Here's what I "had" to install so far for Kubuntu Jaunty 9.04 (first few were 
required by numpy):

  495  sudo apt-get install matplotlib  <-- always worth a try... didn

Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

Jeff,
   I had already had tk-dev installed:
$ sudo apt-get install tk-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
tk-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

Please see my latest...  This is amazingly difficult.  Didn't remember it being 
this hard when I did it on my Suse machine.

Kurt

==
> Date: Tue, 13 Oct 2009 13:46:22 -0600
> From: Jeff Whitaker 
> Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl
>   0.99.1.1, python 2.6
> To: KURT PETERS 
> Cc: matplotlib-users@lists.sourceforge.net
> Message-ID: <4ad4d90e.5080...@fastmail.fm>


> > src/_tkagg.cpp:30:18: error: tk.h: No such file or directory
> > src/_tkagg.cpp:38: error: ISO C++ forbids declaration of ?Tcl_Interp? 
> > with no type
> > src/_tkagg.cpp:38: error: expected ?;? before ?*? token
> > src/_tkagg.cpp:42: error: ?ClientData? was not declared in this scope
> > src/_tkagg.cpp:42: error: ?Tcl_Interp? was not declared in this scope
> > src/_tkagg.cpp:42: error: ?interp? was not declared in this scope
> > src/_tkagg.cpp:43: error: expected primary-expression before ?int?
> > src/_tkagg.cpp:43: error: expected primary-expression before ?char?
> > src/_tkagg.cpp:43: error: initializer expression list treated as 
> > compound expression
> > src/_tkagg.cpp:44: error: expected ?,? or ?;? before ?{? token
> > /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:958:
> >  
> > warning: ?int _import_array()? defined but not used
> > src/_tkagg.cpp:42: warning: ?PyAggImagePhoto? defined but not used
> > error: command 'gcc' failed with exit status 1
> > [/code]
> 
> Kurt:  It's not finding tk.h, so you probably need to install the tk-dev 
> package.
> 
> -Jeff
> 
> 
> Jeffrey S. Whitaker Phone  : (303)497-6313
> Meteorologist   FAX: (303)497-6449
> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
> 

> 
> Here's what I "had" to install so far for Kubuntu Jaunty 9.04 (first few were 
> required by numpy):
> 
>   495  sudo apt-get install matplotlib  <-- always worth a try... didn't work
> 
>   520  sudo apt-get install libatlas3gf-3dnow
> 
>   523  sudo apt-get install libblas-dev
> 
>   532  sudo apt-get install gfortran
> 
>   534  sudo apt-get install lapack
> 
>   536  sudo apt-get install liblapack-dev
> 
>   537  sudo apt-get install python-symeig libatlas-3dnow-dev
> 
>   549  sudo apt-get install freetype
> 
>   552  sudo apt-get install libfreetype6
> 
>   554  sudo apt-get install libfreetype6-dev
> 
>   555  sudo apt-get install tk
> 
>   556  sudo apt-get install dvipng
> 
>   569  sudo apt-get install python-qt4 python-qt4-common
> 
>   574  sudo apt-get install python-tk wxPython
> 
>   576  sudo apt-get install python-tk python-wxaddons
> 
>   577  sudo apt-get install python-tk python-wxtools
> 
>   590  sudo apt-get install wx-common
> 
>   591  sudo apt-get install wx-headers
> 
>   592  sudo apt-get install wx2.8-headers
> 
>   593  sudo apt-get install libwxbase2.8-0
> 
>   594  sudo apt-get install libwxgtk2.8-0
> 
>   603  sudo apt-get install tcl8.5-dev
> 604 sudo apt-get install tk-dev

  --
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread qubax
Greetings.

What i want to do is something like:

ipython ...



t=linspace(0,2,50)
y=sin(2*pi*t)

pyplot.plot(t,y)
pyplot.show()



I get the plot here ... but now i want to do some more stuff in
the ipython shell (and possibly have the plot still open)

How do i free the shell from the plot thread?

Thanks



-- 
The king who needs to remind his people of his rank, is no king.

To gain that which is worth having, it may be necessary to lose everything else.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread Jeff Whitaker
qu...@gmx.at wrote:
> Greetings.
>
> What i want to do is something like:
>
> ipython ...
>
> 
>
> t=linspace(0,2,50)
> y=sin(2*pi*t)
>
> pyplot.plot(t,y)
> pyplot.show()
>
> 
>
> I get the plot here ... but now i want to do some more stuff in
> the ipython shell (and possibly have the plot still open)
>
> How do i free the shell from the plot thread?
>
> Thanks
>
>
>
>   
http://matplotlib.sourceforge.net/users/shell.html

bottom line - don't call show.

-Jeff

-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread Jeff Whitaker
KURT PETERS wrote:
> Jeff,
>I had already had tk-dev installed:
> $ sudo apt-get install tk-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> tk-dev is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
>
> Please see my latest...  This is amazingly difficult.  Didn't remember 
> it being this hard when I did it on my Suse machine.
>
> Kurt


So where's your tk.h file?

-Jeff
>
> ==
> > Date: Tue, 13 Oct 2009 13:46:22 -0600
> > From: Jeff Whitaker 
> > Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl
> > 0.99.1.1, python 2.6
> > To: KURT PETERS 
> > Cc: matplotlib-users@lists.sourceforge.net
> > Message-ID: <4ad4d90e.5080...@fastmail.fm>
> 
>
> > > src/_tkagg.cpp:30:18: error: tk.h: No such file or directory
> > > src/_tkagg.cpp:38: error: ISO C++ forbids declaration of ?Tcl_Interp?
> > > with no type
> > > src/_tkagg.cpp:38: error: expected ?;? before ?*? token
> > > src/_tkagg.cpp:42: error: ?ClientData? was not declared in this scope
> > > src/_tkagg.cpp:42: error: ?Tcl_Interp? was not declared in this scope
> > > src/_tkagg.cpp:42: error: ?interp? was not declared in this scope
> > > src/_tkagg.cpp:43: error: expected primary-expression before ?int?
> > > src/_tkagg.cpp:43: error: expected primary-expression before ?char?
> > > src/_tkagg.cpp:43: error: initializer expression list treated as
> > > compound expression
> > > src/_tkagg.cpp:44: error: expected ?,? or ?;? before ?{? token
> > > 
> /usr/lib/python2.6/dist-packages/numpy/core/include/numpy/__multiarray_api.h:958:
>  
>
> > > warning: ?int _import_array()? defined but not used
> > > src/_tkagg.cpp:42: warning: ?PyAggImagePhoto? defined but not used
> > > error: command 'gcc' failed with exit status 1
> > > [/code]
> >
> > Kurt: It's not finding tk.h, so you probably need to install the 
> tk-dev package.
> >
> > -Jeff
> >
> > 
> > Jeffrey S. Whitaker Phone : (303)497-6313
> > Meteorologist FAX : (303)497-6449
> > NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov
> > 325 Broadway Office : Skaggs Research Cntr 1D-113
> > Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
> >
> 
> >
> > Here's what I "had" to install so far for Kubuntu Jaunty 9.04 (first 
> few were required by numpy):
> >
> > 495 sudo apt-get install matplotlib <-- always worth a try... didn't 
> work
> >
> > 520 sudo apt-get install libatlas3gf-3dnow
> >
> > 523 sudo apt-get install libblas-dev
> >
> > 532 sudo apt-get install gfortran
> >
> > 534 sudo apt-get install lapack
> >
> > 536 sudo apt-get install liblapack-dev
> >
> > 537 sudo apt-get install python-symeig libatlas-3dnow-dev
> >
> > 549 sudo apt-get install freetype
> >
> > 552 sudo apt-get install libfreetype6
> >
> > 554 sudo apt-get install libfreetype6-dev
> >
> > 555 sudo apt-get install tk
> >
> > 556 sudo apt-get install dvipng
> >
> > 569 sudo apt-get install python-qt4 python-qt4-common
> >
> > 574 sudo apt-get install python-tk wxPython
> >
> > 576 sudo apt-get install python-tk python-wxaddons
> >
> > 577 sudo apt-get install python-tk python-wxtools
> >
> > 590 sudo apt-get install wx-common
> >
> > 591 sudo apt-get install wx-headers
> >
> > 592 sudo apt-get install wx2.8-headers
> >
> > 593 sudo apt-get install libwxbase2.8-0
> >
> > 594 sudo apt-get install libwxgtk2.8-0
> >
> > 603 sudo apt-get install tcl8.5-dev
> > 604 sudo apt-get install tk-dev
>
> 
>
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> 
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list

Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

Well, while I waited for more help/thoughts on the matter, I happened to have 
another machine with Jaunty 9.04 that I thought I'd give a try
 I consolidated the install down with the "apt-get" commands at the bottom, and 
matplotlib failed on the new machine as well (but took longer to fail possibly 
because the other machine had already compiled everything up to the failing 
point).  This "new" machine is Intel-based, whereas the other one was 
AMD-based.  Similar error message:
[code]

In file included from /usr/include/c++/4.3/ext/hash_map:64,
 from ./CXX/Extensions.hxx:68,
 from src/_backend_agg.h:8,
 from src/_tkagg.cpp:18:
/usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated.
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions 
build/temp.linux-i686-2.6/src/agg_py_transforms.o 
build/temp.linux-i686-2.6/src/_tkagg.o 
build/temp.linux-i686-2.6/CXX/cxx_extensions.o 
build/temp.linux-i686-2.6/CXX/IndirectPythonInterface.o 
build/temp.linux-i686-2.6/CXX/cxxsupport.o 
build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib 
-ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o 
build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
/usr/bin/ld: cannot find -ltk8.5
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1
[/code]


<"OLD MACHINE" response>
[code]
BUILDING MATPLOTLIB 
matplotlib: 0.99.1.1
python: 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)  [GCC
4.3.3]  
  platform: linux2  

REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.27
   Tkinter: Tkinter: 70220, Tk: 8.5, Tcl: 8.5
  wxPython: 2.8.9.1  
* WxAgg extension not required for wxPython >= 2.8
pkg-config: looking for pygtk-2.0 gtk+-2.0
* Package pygtk-2.0 was not found in the pkg-config
* search path. Perhaps you should add the directory
* containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH 
* environment variable No package 'pygtk-2.0' found
* Package gtk+-2.0 was not found in the pkg-config 
* search path. Perhaps you should add the directory
* containing `gtk+-2.0.pc' to the PKG_CONFIG_PATH  
* environment variable No package 'gtk+-2.0' found 
* You may need to install 'dev' package(s) to  
* provide header files.
  Gtk+: no 
* Could not find Gtk+ headers in any of
* '/usr/local/include', '/usr/include', '.'
   Mac OS X native: no
Qt: no
   Qt4: no
 Cairo: 1.4.12

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

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.11
   ghostscript: 8.64
 latex: 3.141592
   pdftops: 0.10.5

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 
'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 
'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 
'matplotlib.delaunay', 'pytz', 'dateutil','dateutil/zoneinfo']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> 
build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._tkagg' extension
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions 
build/temp.linux-i686-2.6/src/agg_py_transforms.o 
build/temp.linux-i686-2.6/src/_tkagg.o 
build/temp.linux-i686-

Re: [Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread qubax
but i want to:
 1) plot something
 2) go on in ipython (with the figure/plot staying on)

is that really not possible?

thanks,
q

On Tue, Oct 13, 2009 at 03:54:22PM -0600, Jeff Whitaker wrote:
> qu...@gmx.at wrote:
> > Greetings.
> >
> > What i want to do is something like:
> >
> > ipython ...
> >
> > 
> >
> > t=linspace(0,2,50)
> > y=sin(2*pi*t)
> >
> > pyplot.plot(t,y)
> > pyplot.show()
> >
> > 
> >
> > I get the plot here ... but now i want to do some more stuff in
> > the ipython shell (and possibly have the plot still open)
> >
> > How do i free the shell from the plot thread?
> >
> > Thanks
> >
> >
> >
> >   
> http://matplotlib.sourceforge.net/users/shell.html
> 
> bottom line - don't call show.
> 
> -Jeff
> 
> -- 
> Jeffrey S. Whitaker Phone  : (303)497-6313
> Meteorologist   FAX: (303)497-6449
> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
> 
> 
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-- 
The king who needs to remind his people of his rank, is no king.

To gain that which is worth having, it may be necessary to lose everything else.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

Apparently, I have two  :-)

$ sudo find / -name "tk.h"

/usr/include/tcl8.4/tk.h
/usr/include/tcl8.4/tk-private/generic/tk.h

Kurt

> Date: Tue, 13 Oct 2009 15:55:51 -0600
> From: jsw...@fastmail.fm
> Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, 
> python 2.6
> To: petersk...@msn.com
> CC: matplotlib-users@lists.sourceforge.net
> 
> KURT PETERS wrote:
> > Jeff,
> >I had already had tk-dev installed:
> > $ sudo apt-get install tk-dev
> > Reading package lists... Done
> > Building dependency tree
> > Reading state information... Done
> > tk-dev is already the newest version.
> > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
> >
> > Please see my latest...  This is amazingly difficult.  Didn't remember 
> > it being this hard when I did it on my Suse machine.
> >
> > Kurt
> 
> 
> So where's your tk.h file?
> 
> -Jeff

  --
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread Jeff Whitaker
KURT PETERS wrote:
> Apparently, I have two  :-)
>
> $ sudo find / -name "tk.h"
>
> /usr/include/tcl8.4/tk.h
> /usr/include/tcl8.4/tk-private/generic/tk.h

But you need /usr/include/tcl8.5/tk.h.  Matplotlib is detecting a tk 8.5 
installation, so it's looking for a tk 8.5 header.

-Jeff
>
> Kurt
>
> > Date: Tue, 13 Oct 2009 15:55:51 -0600
> > From: jsw...@fastmail.fm
> > Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 
> 0.99.1.1, python 2.6
> > To: petersk...@msn.com
> > CC: matplotlib-users@lists.sourceforge.net
> >
> > KURT PETERS wrote:
> > > Jeff,
> > > I had already had tk-dev installed:
> > > $ sudo apt-get install tk-dev
> > > Reading package lists... Done
> > > Building dependency tree
> > > Reading state information... Done
> > > tk-dev is already the newest version.
> > > 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded
> > >
> > > Please see my latest... This is amazingly difficult. Didn't remember
> > > it being this hard when I did it on my Suse machine.
> > >
> > > Kurt
> >
> >
> > So where's your tk.h file?
> >
> > -Jeff
>


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread Jeff Whitaker
qu...@gmx.at wrote:
> but i want to:
>  1) plot something
>  2) go on in ipython (with the figure/plot staying on)
>
> is that really not possible?
>
> thanks,
> q
>   

That's exactly what happens in ipython (in pylab mode), if you don't 
call show.

-Jeff
> On Tue, Oct 13, 2009 at 03:54:22PM -0600, Jeff Whitaker wrote:
>   
>> qu...@gmx.at wrote:
>> 
>>> Greetings.
>>>
>>> What i want to do is something like:
>>>
>>> ipython ...
>>>
>>> 
>>>
>>> t=linspace(0,2,50)
>>> y=sin(2*pi*t)
>>>
>>> pyplot.plot(t,y)
>>> pyplot.show()
>>>
>>> 
>>>
>>> I get the plot here ... but now i want to do some more stuff in
>>> the ipython shell (and possibly have the plot still open)
>>>
>>> How do i free the shell from the plot thread?
>>>
>>> Thanks
>>>
>>>
>>>
>>>   
>>>   
>> http://matplotlib.sourceforge.net/users/shell.html
>>
>> bottom line - don't call show.
>>
>> -Jeff
>>
>> -- 
>> Jeffrey S. Whitaker Phone  : (303)497-6313
>> Meteorologist   FAX: (303)497-6449
>> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
>> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
>> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
>>
>>
>> --
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay 
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
>
>   


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread qubax
okay. don't shoot me

you need to start ipython with:

   ipython -pylab

as noted in: http://matplotlib.sourceforge.net/users/shell.html

made someone else can benefit from my mistake

sorry for bothering you

q

On Wed, Oct 14, 2009 at 02:09:21AM +0200, qu...@gmx.at wrote:
> but i want to:
>  1) plot something
>  2) go on in ipython (with the figure/plot staying on)
> 
> is that really not possible?
> 
> thanks,
> q
> 
> On Tue, Oct 13, 2009 at 03:54:22PM -0600, Jeff Whitaker wrote:
> > qu...@gmx.at wrote:
> > > Greetings.
> > >
> > > What i want to do is something like:
> > >
> > > ipython ...
> > >
> > > 
> > >
> > > t=linspace(0,2,50)
> > > y=sin(2*pi*t)
> > >
> > > pyplot.plot(t,y)
> > > pyplot.show()
> > >
> > > 
> > >
> > > I get the plot here ... but now i want to do some more stuff in
> > > the ipython shell (and possibly have the plot still open)
> > >
> > > How do i free the shell from the plot thread?
> > >
> > > Thanks
> > >
> > >
> > >
> > >   
> > http://matplotlib.sourceforge.net/users/shell.html
> > 
> > bottom line - don't call show.
> > 
> > -Jeff
> > 
> > -- 
> > Jeffrey S. Whitaker Phone  : (303)497-6313
> > Meteorologist   FAX: (303)497-6449
> > NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
> > 325 BroadwayOffice : Skaggs Research Cntr 1D-113
> > Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
> > 
> > 
> > --
> > Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> > is the only developer event you need to attend this year. Jumpstart your
> > developing skills, take BlackBerry mobile applications to market and stay 
> > ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> > http://p.sf.net/sfu/devconference
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> -- 
> The king who needs to remind his people of his rank, is no king.
> 
> To gain that which is worth having, it may be necessary to lose everything 
> else.
> 
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-- 
The king who needs to remind his people of his rank, is no king.

To gain that which is worth having, it may be necessary to lose everything else.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

OK, that got me a hair further  :-)  With your suggestion I got past that speed 
bump  by:
sudo apt-get install tk8.5-dev tcl8.5-dev

Now the error is a little more sinister.  I did a tiny bit of research and some 
posts says the error could be due to no installation of g++.  but...
[code]
sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[/code]

[code]
building 'matplotlib.backends._tkagg' extension 
  
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions 
build/temp.linux-i686-2.6/src/agg_py_transforms.o 
build/temp.linux-i686-2.6/src/_tkagg.o 
build/temp.linux-i686-2.6/CXX/cxx_extensions.o 
build/temp.linux-i686-2.6/CXX/IndirectPythonInterface.o 
build/temp.linux-i686-2.6/CXX/cxxsupport.o 
build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib 
-ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o 
build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so
building 'matplotlib.backends._macosx' extension
  
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
-I/usr/lib/python2.6/dist-packages/numpy/core/include -I/usr/local/include 
-I/usr/include -I. -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc 
-Iagg24/include -I. -I/usr/include/python2.6 -c src/_macosx.m -o 
build/temp.linux-i686-2.6/src/_macosx.o 

gcc: error trying to exec 'cc1obj': execvp: No such file or directory   
  
error: command 'gcc' failed with exit status 1
[/code]

Is it possible I need a special version of g++?
Kurt


  --
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread Jeff Whitaker
KURT PETERS wrote:
> OK, that got me a hair further  :-)  With your suggestion I got past 
> that speed bump by:
> sudo apt-get install tk8.5-dev tcl8.5-dev
>
> Now the error is a little more sinister.  I did a tiny bit of research 
> and some posts says the error could be due to no installation of g++.  
> but...
> [code]
> sudo apt-get install g++
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> g++ is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> [/code]
> 
> [code]
> building 'matplotlib.backends._tkagg' 
> extension 
>   
>
> g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions 
> build/temp.linux-i686-2.6/src/agg_py_transforms.o 
> build/temp.linux-i686-2.6/src/_tkagg.o 
> build/temp.linux-i686-2.6/CXX/cxx_extensions.o 
> build/temp.linux-i686-2.6/CXX/IndirectPythonInterface.o 
> build/temp.linux-i686-2.6/CXX/cxxsupport.o 
> build/temp.linux-i686-2.6/CXX/cxxextensions.o -L/usr/local/lib 
> -L/usr/local/lib -ltk8.5 -ltcl8.5 -lstdc++ -lm -lfreetype -lz -lstdc++ 
> -lm -o 
> build/lib.linux-i686-2.6/matplotlib/backends/_tkagg.so   
> building 'matplotlib.backends._macosx' 
> extension 
>  
>
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
> -Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
> -I/usr/lib/python2.6/dist-packages/numpy/core/include 
> -I/usr/local/include -I/usr/include -I. 
> -I/usr/lib/python2.6/dist-packages/numpy/core/include -Isrc 
> -Iagg24/include -I. -I/usr/include/python2.6 -c src/_macosx.m -o 
> build/temp.linux-i686-2.6/src/_macosx.o   
>   
>
> gcc: error trying to exec 'cc1obj': execvp: No such file or 
> directory
> error: command 'gcc' failed with exit status 1
> [/code]
>
Kurt:

I don't think you should be building the macosx backend on linux.  Try 
copying setup.cfg.template to setup.cfg, then edit that file and 
uncomment the line

#macosx = False

Then run setup.py build again.


-Jeff
> Is it possible I need a special version of g++?
> Kurt
>
>
> 
>
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> 
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, python 2.6

2009-10-13 Thread KURT PETERS

> From: jsw...@fastmail.fm
> Subject: Re: [Matplotlib-users] cannot install kubuntu 9.04 mpl 0.99.1.1, 
> python 2.6
> To: petersk...@msn.com
> 
> KURT PETERS wrote:
> > OK, that got me a hair further  :-)  With your suggestion I got past 
> > that speed bump by:
> > sudo apt-get install tk8.5-dev tcl8.5-dev
> >

> > error: command 'gcc' failed with exit status 1
> > [/code]
> >
> Kurt:
> 
> I don't think you should be building the macosx backend on linux.  Try 
> copying setup.cfg.template to setup.cfg, then edit that file and 
> uncomment the line
> 
> #macosx = False
> 
> Then run setup.py build again.
> 
> 
> -Jeff


You're right, I had just tried something similar before I received your post:
I modified the setup.cfg with:
#gtk = False
#gtkagg = False
tkagg = True
wxagg = True
macosx = auto
qtagg = True

-->  I'm not sure if the qtagg means anything, but since I'm using qt, I 
thought I'd throw it in there and see what happens.

Thanks for the help!

If someone wants to modify the install page with the following suggested deps.:

TO ANYONE TRYING TO GET ALL DEPS FOR Kubuntu JAUNTY (9.04) with python 2.6...
This is the final set that got me there:

sudo apt-get install libblas-dev gfortran liblapack-dev python-symeig
libfreetype6 libfreetype6-dev tk dvipng python-qt4 python-qt4-common
python-tk python-wxgtk2.8 python-wxaddons python-wxtools wx-common
wx2.8-headers libwxbase2.8-0 libwxbase2.8-dev libwxgtk2.8-0
libwxgtk2.8-dev tcl8.5-dev tk-dev gfortran-multilib

sudo apt-get install python-qt4-dev libqt4-core python-qt4-common python-qt4
sudo apt-get install tk8.5-dev tcl8.5-dev

for Intel:

sudo apt-get install libatlas-sse2-dev libatlas3gf-sse2

or for AMD:

sudo apt-get install libatlas-3dnow-dev libatlas3gf-3dnow
  --
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] help with fill_between and a colorbar

2009-10-13 Thread John
Hello, I have the following function as an example. You can see I started to
play with one of the demos to put a colorbar on it. I'm a little confused
how to make this work, as on my figure I have several 'collections'. The
other examples I have seen deal with one collection. Maybe someone could
show how to make a color bar here??
Thanks!


#!/usr/bin/env python

import matplotlib as mpl
import numpy as np
import matplotlib.pyplot as plt

def plot_fill_between(array=None):
""" plot with fill_between for a cumsum vector """

# Set up plotting environment
fig = plt.figure()
nx = 40
ny = 20
if array is None:
X = range(nx)
array = np.random.rand(nx,ny)

array = np.cumsum(array,axis=1)

Nc = np.array([float(i)/ny for i in range(ny)])
norm = mpl.colors.normalize(Nc.min(),Nc.max())
jet = plt.cm.get_cmap('jet')
for i in range(ny-1):
cmap = jet(norm(Nc[i]))
if i == 0:

 plt.fill_between(X,np.zeros(len(array[:,i])),array[:,i],color=cmap,label='%s'
% i)
plt.fill_between(X,array[:,i],array[:,i+1],color=cmap,label='%s' %
i)

plt.title('Fill Between Demo')
## ListedColormap
#ax2 = fig.add_axes([0.15, 0.05, 0.75, 0.05])

#cmap = mpl.colors.ListedColormap(range(H.numageclasses))
#cmap.set_over('0.25')
#cmap.set_under('0.75')

## If a ListedColormap is used, the length of the bounds array must be
## one greater than the length of the color list.  The bounds must be
## monotonically increasing.
#bounds = range(H.numageclasses+1)
#norm = mpl.colors.BoundaryNorm(bounds, cmap.N)
##cb2 = mpl.colorbar.ColorbarBase(ax2, cmap=cmap,
##norm=norm,
### to use 'extend', you must
### specify two extra boundaries:
##boundaries=[0]+bounds+[13],
##extend='both',
##ticks=bounds, # optional
##spacing='proportional',
##orientation='horizontal')
##cb2.set_label('Units')

return fig

if __name__ == "__main__":
fig = plot_fill_between()
plt.show()
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread Ernest Adrogué
14/10/09 @ 02:38 (+0200), thus spake qu...@gmx.at:
> okay. don't shoot me
> 
> you need to start ipython with:
> 
>ipython -pylab
> 

or alternatively, start ipython normally, import matplotlib.pyplot
and then call matplotlib.pylot.ion() which turns the 'interactive
mode' on.

then when you create a figure, a window will pop up, but the shell
will still be operative.

-- 
Ernest

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting from within ipython, and then go on in the shell calculations

2009-10-13 Thread Eric Firing
Ernest Adrogué wrote:
> 14/10/09 @ 02:38 (+0200), thus spake qu...@gmx.at:
>> okay. don't shoot me
>>
>> you need to start ipython with:
>>
>>ipython -pylab
>>
> 
> or alternatively, start ipython normally, import matplotlib.pyplot
> and then call matplotlib.pylot.ion() which turns the 'interactive
> mode' on.
> 
> then when you create a figure, a window will pop up, but the shell
> will still be operative.
> 

No, you have to call ipython with a threading option:
-gthread, -qthread, -q4thread, -wthread, -pylab

Eric



--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users