Plot window 对于 GR 和 Plotly 都是空白的

Plot window is blank for both GR and Plotly

我正在尝试同时使用 GR 和 Plotly 进行绘图,但我得到的只是一片空白 window。 运行 在 MacBook Pro M1 上。 lib 安装没有问题。

using Plots
gr()

function plot_calendar_viz()
    plot(Plots.fakedata(50, 5), w = 3)
end

using PlotlyJS

function plot_calendar_viz()
    x = ["2013-10-04 22:23:00", "2013-11-04 22:23:00", "2013-12-04 22:23:00"]
    trace1 = scatter(;x=1:4, y=[10, 15, 13, 17], mode="markers")
    trace2 = scatter(;x=2:5, y=[16, 5, 11, 9], mode="lines")
    trace3 = scatter(;x=1:4, y=[12, 9, 15, 12], mode="lines+markers")
    plot([trace1, trace2, trace3])
end

我也尝试过使用 x86 Julia 版本。同样的空白 window.

正如 Nils 所建议的:如果我尝试 using Plots; plot(rand(10)) 我得到:

Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: could not load library "libGR.so"

更新:

如果我尝试重建 GR 它可以工作,但 plotly 仍然没有。

好的,在这次更新中,Plots 的 GR 后端安装似乎出错了。对此的通用解决方案是 ]build GR,这将为 GR 后端 re-install 必要的二进制文件。

请注意,MacBook Pro M1 (macOS) 上对 Julia 运行 的支持目前为“Tier3”(https://julialang.org/downloads/#supported_platforms):

Tier 3: Julia may or may not build. If it does, it is unlikely to pass tests. Binaries may be available in some cases. When they are, they should be considered experimental. Ongoing support is dependent on community efforts.

事实上,目前情况看起来还不错,但您应该在 github.

上了解最新版本并跟踪问题