-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
我想测试一下程序对画图是如何处理的:
于是我在jupyter_backend.py下面加上了main函数:
if __name__ == '__main__':
kernel = JupyterKernel("./cache/")
img_code = """
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [2, 3, 5, 7, 6]
plt.plot(x, y)
plt.title('Simple Line Plot')
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.show()
"""
res = kernel.execute_code(img_code)
print(res)
但是发现最终打印的res是('', []). Debug发现上面iopub_msg = self.kernel_client.get_iopub_msg(timeout=1)无法捕捉到图像的信息。想请问一下,你们是如何实现输出图像的呢?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels