代码之家  ›  专栏  ›  技术社区  ›  A.Papa

Jupyter只绘制图形,不使用执行命令

  •  1
  • A.Papa  · 技术社区  · 6 年前

    您好,我使用的是jupyter笔记本,每次绘图时,我都会得到所有matplolib内联执行,如下所示。图表显示在底部。但我只想得到图表,因为我想用它来表示。 enter image description here

    我试过下面的

        %matplotlib inline
    from IPython.core.interactiveshell import InteractiveShell
    InteractiveShell.ast_node_interactivity = "all"
    

    但这并不总是奏效 enter image description here

    1 回复  |  直到 6 年前
        1
  •  1
  •   Ashlou    6 年前

    您正在使用python 3吗?

    如果是,添加

    %matplotlib notebook