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
|