下面的代码执行正常,但没有显示我正在等待的窗口。我相信这是由于我的 IDE (IntelliJ IDEA) 造成的问题,它只是启动控制台,阻止它显示任何窗口。我该如何解决这个问题? IDE 中是否有任何选项可以检查例如?
import co.theasi.plotly.{Plot, draw}
object Main {
def main(args : Array[String]) : Unit = {
val xs = 0.0 to 2.0 by 0.1
val ys = xs.map { x => x*x }
val plot = Plot().withScatter(xs, ys)
draw(plot, "my-first-plot")
}
}
最佳答案
看起来这不是 scala 的plot.ly 库的功能(与 wisp 不同)。 draw(plot, "my-first-plot")
将绘图文件推送到plot.ly,可以通过logging into your plot.ly account查看并导航至我的文件。在那里你可以看到已经推送到plot.ly 的图。 Based on the docs ,看来查看文档的唯一方法是通过 writer.Server
实例将它们推送到plot.ly 服务器。
你当然可以 procure an on-premise plot.ly服务器仅需 9,950 美元。
关于scala - Plotly 和 IntelliJ IDEA,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48244473/