1

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.

BAR
  • 15,909
  • 27
  • 97
  • 185

2 Answers2

2

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.

Nils Gudat
  • 13,222
  • 3
  • 39
  • 60
  • Just installed Julia 1.7.1 and GR works, but plotly still does not. – BAR Feb 02 '22 at 22:49
  • Okay maybe ask the PlotlyJS thing as a separate question and mark this one as resolved given it was a GR build issue? These are clearly very different problems so not ideal to discuss in one SO question. – Nils Gudat Feb 03 '22 at 10:47
0

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.

daycaster
  • 2,655
  • 2
  • 15
  • 18