'Saves the image file to disk.'

def save_image(self, image_file):

    self.ensure_pyplot()
    command = ('plt.gcf().savefig("%s")' % image_file)
    self.process_input_line('bookmark    ipy_thisdir', store_history=False)
    self.process_input_line('cd    -b    ipy_savedir', store_history=False)
    self.process_input_line(command, store_history=False)
    self.process_input_line('cd    -b    ipy_thisdir', store_history=False)
    self.process_input_line('bookmark    -d    ipy_thisdir', store_history=False)
    self.clear_cout()
