【问题标题】:F# interactive notebook not showing Plotly chartF#交互式笔记本不显示绘图图表
【发布时间】:2021-02-24 20:46:59
【问题描述】:

我是 F# 交互式笔记本和 XPlot.Plotly 的新手。

我尝试了以下代码,希望能显示出漂亮的正弦波

#r "nuget: XPlot.Plotly"
open XPlot.Plotly

let series = [for x in -5.0 .. 0.1 .. 5.0 -> sin x]

Chart.Line(series)

我得到的是Table showing Height, Id and Width而不是图表

  • 我已经尝试过 VS Code 1.54.0-insider 以及 1.53.2 相同的 结果
  • 我尝试了几个不同版本的 .NET Interactive 结果相同的笔记本
  • 我已经尝试了几个版本的 .Net 5 开发工具包
  • 我已经尝试了几个版本的 XPlot.Plotly

请指出我做错了什么

【问题讨论】:

    标签: plotly f#-interactive


    【解决方案1】:

    您需要添加交互式 nuget 包

    #r "nuget: XPlot.Plotly"
    #r "nuget: XPlot.Plotly.Interactive"
    

    【讨论】:

    • 成功了,感谢您的回答
    猜你喜欢
    • 2016-07-04
    • 1970-01-01
    • 1970-01-01
    • 2019-03-17
    • 2021-01-27
    • 2020-07-19
    • 2019-11-13
    • 1970-01-01
    • 2020-07-22
    相关资源
    最近更新 更多