def send_figure(fig):
fmt = InlineBackend.instance().figure_format<EOL>data = print_figure(fig, fmt)<EOL>if data is None:<EOL><INDENT>return<EOL><DEDENT>mimetypes = { '<STR_LIT>' : '<STR_LIT>', '<STR_LIT>' : '<STR_LIT>' }<EOL>mime = mimetypes[fmt]<EOL>sys.stdout.flush(); sys.stderr.flush()<EOL>publish_display_data(<EOL>'<STR_LIT>',<EOL>{mime : data}<EOL>)<EOL>
Draw the given figure and send it as a PNG payload.