machine-learning - 绘图显示 AWS Sagemaker JupyterLab 中的空白图表

标签 machine-learning plotly amazon-sagemaker jupyter-lab plotly-python

背景:我是 Python 世界的新手,正在使用 Plotly 在 Python 中创建基本图形。我正在使用 AWS Sagemaker 的 JupyterLab 创建 python 脚本。

问题:我一直在尝试运行 Plotly 网站上提到的基本代码,但即使是那些也返回空白图形。

问题解决我自己尝试过:

  • pip 安装了 4.6.0 版
  • https://plotly.com/python/getting-started/上提到的步骤JupyterLab 支持已经执行

  • 代码示例:
    import plotly.graph_objects as go
    fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
    fig.show()
    

    最佳答案

    我最近有同样的问题。建议简单更改 here帮助过我。我知道这是一个临时解决方法,直到找到正确的修复方法。

    // fig = go.Figure()
    fig = go.FigureWidget()    // replace with this
    // fig.show()
    fig                        // remove .show()
    

    关于machine-learning - 绘图显示 AWS Sagemaker JupyterLab 中的空白图表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61214419/

    相关文章:

    python - Tensorflow 神经网络在训练后总是有 50% 的把握

    r - 多组分组条形图(在同一绘图上),无需在 r 中使用 "transforms"绘图

    python - 使用经过训练的模型层在 keras 中创建另一个模型

    machine-learning - Keras 中 fit_generator 的下一个纪元的起点

    r - %||% 运算符在 R 中起什么作用?百分比 管道 管道 百分比

    python - 极坐标/等值线图 : How to plot some curves inside a circle?

    amazon-web-services - 为运行推理模型的 docker 容器提供额外的输入

    amazon-web-services - 如何打印 aws-requests-auth 发送的规范字符串?

    amazon-web-services - AWS Sagemaker 自定义训练作业容器发出损失指标

    machine-learning - 如何从惩罚逻辑回归的拟合管道中提取系数?