【问题标题】:Julia PlotlyJS delay show plot, update plotJulia PlotlyJS 延迟显示情节,更新情节
【发布时间】:2020-07-17 14:29:17
【问题描述】:

我正在尝试在使用 Blink 的小型应用程序中包含使用 PlotlyJS 包的绘图。 到目前为止,每当我使用绘图功能时,它都会打开一个新窗口,我想避免它.. 此外,更新情节时,会弹出另一个窗口 - 也不需要。 有谁知道如何避免这些新窗口?提前致谢!

示例代码:

using PlotlyJS,Blink

scatter_1 = scatter(;x=rand(10),y=rand(10))
p = plot(scatter_1) # first unwanted window

w = Window()
body!(w,p)

scatter_2 = scatter(;x = 2*rand(10), y = 2*rand(10))
addtraces(p, scatter_2) #second unwated window


【问题讨论】:

    标签: electron julia plotly blink


    【解决方案1】:

    尝试在行尾添加;

    using PlotlyJS,Blink
    
    scatter_1 = scatter(;x=rand(10),y=rand(10))
    p = plot(scatter_1);
    
    w = Window()
    body!(w,p)
    
    scatter_2 = scatter(;x = 2*rand(10), y = 2*rand(10))
    addtraces(p, scatter_2);
    

    【讨论】:

    • 就是这么简单……难以置信;谢谢!
    猜你喜欢
    • 2019-08-31
    • 2014-09-13
    • 2017-11-07
    • 2022-01-06
    • 2016-03-24
    • 2020-08-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多