key input via connect, and surface plotting

Hi, working more and more with matplotlib and adapt my local

    > tools I find that (for me) 2 plotting functionalities are
    > still missing (but are in the list of the ''goals''):

    > - plotting a surface either using a mesh/grid like plotwith
    > colours or a smooth rendering -

I am not familiar with "plotwith colours". Is that a gnuplot command?

I assume you are referring to a 3D surf or mesh plot here, no? The
official answer here has always been we're deferring any serious work
on 3D until we have a feature complete 2D lib in part because there
are already a number of excellent 3D tools for python. There has been
some proof-of-concept work integrating VTK ( a premier 3D lib) with
matplotlib/agg -- you can find links on the goals page.

Although there are good tools already out there, I am receptive to the
argument that it's nice to have a core set of functionality under one
roof, and so would like to include support for basic 3D plots down the
road. If some enterprising person wanted to take this on sooner, I
wouldn't be opposed. But I can't give you an estimate on the time
frame right now. Like much in the open source world, it's chronically
6 months away :slight_smile:

    > have the connect function update the ''key'' field when
    > using the keyboard

OK, to make up for the non-committal answer above, I implemented this
in CVS and it will be available in the next release. Here's the
keypress_demo from CVS

from pylab import *

def press(event):
    if event.key=='g':
        grid()
        draw()
    
connect('key_press_event', press)

title('press g to toggle grid')
plot(rand(12), rand(12), 'go')
show()

In the process of getting this to work, I refactored the event
handling across backends in such a way that it is now robust and seems
to work well on all the backends, supporting multiple connects and
disconnects.

JDH