2
我有這樣的代碼創建一個交互式的散點圖:把一個matplotlib圖分成的wxPython
if 1: # picking on a scatter plot (matplotlib.collections.RegularPolyCollection)
x, y, c, s = rand(4, 100)
def onpick3(event):
ind = event.ind
print('onpick3 scatter:', ind, np.take(x, ind), np.take(y, ind))
fig = figure()
ax1 = fig.add_subplot(111)
col = ax1.scatter(x, y, 100*s, c, picker=True)
#fig.savefig('pscoll.eps')
fig.canvas.mpl_connect('pick_event', onpick3)
我想要做的就是這個圖融入wxPython的
我怎麼能去這樣做?
您可能會覺得這篇博文有用:http://eli.thegreenplace.net/2008/08/01/matplotlib-with-wxpython-guis/ – milancurcic