--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/3332cdec-b938-495e-821a-86132ac31749%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ThomasHi Jeff,I think the output_hook parameter to execute_interactive() is what you want. Here's the docs:
http://jupyter-client.readthedocs.io/en/latest/api/client.html#jupyter_client.BlockingKernelClient.execute_interactive
On 9 July 2017 at 13:37, Jeff Zhang <zjf...@gmail.com> wrote:
I try to use jupyter_client to get the matplotlib output and display it in my app. Here's what I did. But io.stdout is just a string. How can I get the actual image data of matplotlib. ThanksIn [6]: with capture_output() as io:...: reply = kc.execute_interactive("import matplotlib.pyplot as plt\n%matplotlib inline\ndata=[1,1,2,3,4]\nplt.figure()\nplt.plot(data)", timeout=TI...: MEOUT)...:...:In [8]: io.stdoutOut[8]: '[<matplotlib.lines.Line2D at 0x1086a8d30>]<matplotlib.figure.Figure at 0x106f220f0>'
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/715e5b28-77b0-40bf-93b3-6301e4567990%40googlegroups.com.