MCPcopy Index your code
hub / github.com/ipython/ipython / save_image

Method save_image

IPython/sphinxext/ipython_directive.py:698–710  ·  view source on GitHub ↗

Saves the image file to disk.

(self, image_file)

Source from the content-addressed store, hash-verified

696 return [data]
697
698 def save_image(self, image_file):
699 """
700 Saves the image file to disk.
701 """
702 self.ensure_pyplot()
703 command = 'plt.gcf().savefig("%s")'%image_file
704 # print('SAVEFIG', command) # dbg
705 self.process_input_line('bookmark ipy_thisdir', store_history=False)
706 self.process_input_line('cd -b ipy_savedir', store_history=False)
707 self.process_input_line(command, store_history=False)
708 self.process_input_line('cd -b ipy_thisdir', store_history=False)
709 self.process_input_line('bookmark -d ipy_thisdir', store_history=False)
710 self.clear_cout()
711
712 def process_block(self, block):
713 """

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