##// END OF EJS Templates
Fixing imports and syntax errors.
Fixing imports and syntax errors.

File last commit:

r2778:08d9badc
r2812:b00ce05e
Show More
backend_payload.py
23 lines | 624 B | text/x-python | PythonLexer
/ IPython / zmq / pylab / backend_payload.py
epatters
Initial checkin of (not yet working) matplotlib payload backend and associated machinery.
r2756 """ Provides basic funtionality for payload backends.
"""
# Local imports.
epatters
* Restored functionality after major merge....
r2778 from IPython.zmq.ipkernel import Kernel
epatters
Initial checkin of (not yet working) matplotlib payload backend and associated machinery.
r2756
def add_plot_payload(format, data, metadata={}):
""" Add a plot payload to the current execution reply.
Parameters:
-----------
format : str
Identifies the format of the plot data.
data : str
The raw plot data.
metadata : dict, optional [default empty]
Allows for specification of additional information about the plot data.
"""
payload = dict(format=format, data=data, metadata=metadata)
Kernel.get_kernel().add_exec_payload('plot', payload)