【问题标题】:copy matlibplot plot image from jupyter lab从 jupyter 实验室复制 matlibplot 绘图图像
【发布时间】:2018-08-28 16:27:04
【问题描述】:

大师,

我试图从 jupyterlab 复制 python 图。虽然图像在 jupyterlab 下看起来不错,但在粘贴到我的 word doc 后显示了一个完全黑色的主题。你能告诉我如何解决这个问题吗?谢谢。

我的代码是

x=[1,2,3]
y=[1,2,3] 
plt.scatter(x, y)

并附上图片

【问题讨论】:

  • 尝试将图片保存为文件,然后插入到Word中
  • 我猜this answer我刚才给的直接解决了这个问题。

标签: python-3.x matplotlib jupyter-notebook jupyter-lab


【解决方案1】:
  1. 右键单击绘图并选择“为输出创建新视图”。
  2. 右键单击输出视图中的绘图并选择“复制图像”或“将图像另存为...”。
  3. 如果您选择“另存为”选项,则不会出现黑边。如果您选择复制/粘贴路线,则可以在您选择的图像编辑器甚至是 powerpoint 中剪掉黑边。

【讨论】:

    【解决方案2】:

    比 user2036476 建议的方法稍快:

    1. 在右击绘图时按住 shift 键
    2. 选择“复制图片”

    完成

    【讨论】:

      猜你喜欢
      • 2018-12-18
      • 2019-06-01
      • 2021-05-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-09
      相关资源
      最近更新 更多