![](https://secure.gravatar.com/avatar/89216dd750588714b8fd5b15ab239f0b.jpg?s=120&d=mm&r=g)
Prabhu Ramachandran <prabhu@aero.iitm.ernet.in> writes:
If I do get to doing it I'll see. However for now you can use the plot code from your code by doing something like so:
def __init__(self, blah, blah):
# add this next line somewhere in your constructor or whereever # you pack your gui elements. self.plotter = plt.plot_canvas(self, size=wxSize(250,250), title="Slicer")
def plot(self, x, y): """ Use this to plot. """ self.plotter.line_list.data = [] lines = [] lines.extend(plt.lines_from_group((x,y))) for i in lines: self.plotter.line_list.append(i) self.plotter.update()
Thanks very much! This worked well, and followed your example to add: def show_image(self, img, x=None, y=None, colormap='grey', scale='no'): """ Use this for images. """ self.plotter.line_list.data = [] self.plotter.image_list.data = [] image = plt.wxplt.image_object(img,x,y,colormap=colormap,scale=scale) self.plotter.image_list.append(image) self.plotter.update() Adam