sordnay schrieb:
> Hi
> I would like to insert a new button on the standard figure toolbar,
> is there an easy way? maybe someone can post an example
This depends on the backend/GUI toolkit you use. If you use wx, a simple
approach might be the following:
------------------
from pylab import *
import wx
def Action(event):
print "you pressed me!"
fig = figure()
toolbar = fig.canvas.toolbar
ID_MY_ACTION = wx.NewId()
toolbar.AddLabelTool(ID_MY_ACTION,
'Autoscale',
wx.Bitmap('autoscale.png', wx.BITMAP_TYPE_PNG)
)
toolbar.Realize()
toolbar.Bind(wx.EVT_TOOL, Action)
show()
--------------------
Gregor
-------------------------------------------------------------------------
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=100&url=/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users