Plot window is blank for both GR and Plotly

454 Views Asked by At

I am trying to plot using both GR and Plotly but all I'm getting is a blank window. Running on a MacBook Pro M1. No problems with lib install.

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

I also tried using the x86 Julia version. Same blank window.

As Nils suggested: If I try using Plots; plot(rand(10)) I get:

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

Update:

If I try to rebuild GR it works, but plotly still does not.

2

There are 2 best solutions below

2
Nils Gudat On BEST ANSWER

Ok so with this update it looks like the installation of the GR backend for Plots went wrong. The generic solution to this is to do ]build GR, which will re-install the necessary binaries for the GR backend.

0
daycaster On

Note that support for Julia running on MacBook Pro M1 (macOS) is currently "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.

In fact, currently, things are looking pretty good, but you should keep up to date on releases and track issues on github.