MCPcopy Create free account
hub / github.com/ipython/ipython / save_image

Method save_image

IPython/sphinxext/ipython_directive.py:678–690  ·  view source on GitHub ↗

Saves the image file to disk.

(self, image_file)

Source from the content-addressed store, hash-verified

676 return [data]
677
678 def save_image(self, image_file):
679 """
680 Saves the image file to disk.
681 """
682 self.ensure_pyplot()
683 command = 'plt.gcf().savefig("%s")'%image_file
684 #print 'SAVEFIG', command # dbg
685 self.process_input_line('bookmark ipy_thisdir', store_history=False)
686 self.process_input_line('cd -b ipy_savedir', store_history=False)
687 self.process_input_line(command, store_history=False)
688 self.process_input_line('cd -b ipy_thisdir', store_history=False)
689 self.process_input_line('bookmark -d ipy_thisdir', store_history=False)
690 self.clear_cout()
691
692 def process_block(self, block):
693 """

Callers 1

process_blockMethod · 0.95

Calls 3

ensure_pyplotMethod · 0.95
process_input_lineMethod · 0.95
clear_coutMethod · 0.95

Tested by

no test coverage detected