Re: [Matplotlib-users] Subclassing Figure and pylab.figure()

2006-06-21 Thread PGM
John > Well, we could keep it simple and just give a hook to custom figures. > If a user wants a custom subplot > > class MyFigure(Figure): >def add_my_subplot(self, *args, **kwargs): > self.axes.append(MySubplot(*args, **kwargs)) > > Is there any downside to this approach? It seems l

[Matplotlib-users] 2D Gaussian Kernel with pylab?

2006-06-21 Thread James Carroll
Hi, What's a good way to create a 2d gaussian kernel with pylab? I want a 9x9 matrix with 1.0 in the center, and 0.0 in the corners, and a gaussian distribution from the center out. Thanks, -Jim All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. T

[Matplotlib-users] 2d Gaussian kernel with pylab?

2006-06-21 Thread James Carroll
Hi, What's a good way to create a 2d gaussian kernel with pylab? I want a 9x9 matrix with 1.0 in the center, and 0.0 in the corners, and a nice gaussian distribution from the center out. Thanks! -Jim All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicia

Re: [Matplotlib-users] Subclassing Figure and pylab.figure()

2006-06-21 Thread John Hunter
> "PGM" == PGM <[EMAIL PROTECTED]> writes: PGM> Now, till we (you ;)) are it, what about updating PGM> Figure.add_subplot() to call user-defined subplots ? I wrote PGM> something along the lines below for my own needs, but that PGM> might be a useful addition... Well, we coul

Re: [Matplotlib-users] Subclassing Figure and pylab.figure()

2006-06-21 Thread PGM
John > I modified pylab (and every backend, damn there are a lot) to support > this feature. Wow, impressive ! Thx a lot > Now you can pass a FigureClass kwarg to the pylab > figure function. With minimal extra work, we could support defaults > so you don't have to explicitly pass it. But b

Re: [Matplotlib-users] overriding the coordinates display on Figure window

2006-06-21 Thread John Pye
Hi John Thanks for that. I thought I recalled seeing the example you mentioned, but obviously it was a different one. I tried the code you gave me and it worked perfectly. Thanks very much! Cheers JP John Hunter wrote: > The approach I suggested doesn't affect the x and y axes, only the > coor

Re: [Matplotlib-users] overriding the coordinates display on Figure window

2006-06-21 Thread John Hunter
> "John" == John Pye <[EMAIL PROTECTED]> writes: John> Hi all I have an application that uses Matplotlib to display John> incidence matrices for systems of equations. I have linked John> up the figure window with 'event handling' so that mouseover John> on the plot shows the va

Re: [Matplotlib-users] Subclassing Figure and pylab.figure()

2006-06-21 Thread John Hunter
> "Pierre" == Pierre GM <[EMAIL PROTECTED]> writes: Pierre> John, Thx for your answer. IMHO, the problem lies really Pierre> with Figure, not Canvas. I'd need the Canvas, whatever Pierre> backend defines it, recognizes that the figure is not a Pierre> classical 'Figure' , but