Plot libraries for Julia Error.

Installing the "plot" library works fine.
Code:
using Pkg
Pkg.update()
Pkg.add("FFMPEG")
Pkg.add("Plots")
Running the plot library gives errors:
Code:
using Plots
x = range(0, 10, length=100)
y1 = sin.(x)
y2 = cos.(x)
p=plot(x, [y1,y2],title="Tutorial",xlabel="x",ylabel="y")
savefig(p,"p.png")
display(p)
sleep(10)
Error:
Code:
ERROR: LoadError: InitError: could not load library "/home/x/.julia/artifacts/ce9ecc22b48f5833c1b89a75263d1d57ab64585a/lib/libfreetype.so"
Shared object "libz.so.1" not found, required by "libfreetype.so"
ERROR: LoadError: Failed to precompile libass_jll
ERROR: LoadError: Failed to precompile FFMPEG_jll
ERROR: LoadError: Failed to precompile FFMPEG
ERROR: LoadError: Failed to precompile FFMPEG
Note this works fine on Artix-linux.

Installing "plotly" library works fine.
Code:
using Pkg
Pkg.add("PlotlyJS")

Running plotly library gives errors
Code:
using PlotlyJS
p=plot(rand(10,4))
display(p)
sleep(20)
Errors:
Code:
ERROR: LoadError: Cannot locate artifact 'electronjs_app' for x86_64-unknown-freebsd-libgfortran5-cxx11-julia_version+1.9.4
ERROR: LoadError: Cannot locate artifact 'electronjs_app' for x86_64-unknown-freebsd-libgfortran5-cxx11-julia_version+1.9.4
ERROR: LoadError: Failed to precompile PlotlyJS
Note : this works fine on artix linux.

Should i enter a PR ? Where ?
 
Julia is interesting to do math & work on large datasets, to do statistics.
But nothing functional , nor object-oriented.
To plot there is gadlfly,makie,pyplot.
 
Julia can do far more than plots :) It's a really good match for low-level programming of graphic cards outside the CUDA hell.

> But nothing functional , nor object-oriented.

Julia is extremely expressive. Julia is homoiconic, with full lisp-style macros. It also has multiple dispatch, which is a far more general technique that OO single-dispatch.
 
Installing the "plot" library works fine.
Code:
using Pkg
Pkg.update()
Pkg.add("FFMPEG")
Pkg.add("Plots")
Running the plot library gives errors:
Code:
using Plots
x = range(0, 10, length=100)
y1 = sin.(x)
y2 = cos.(x)
p=plot(x, [y1,y2],title="Tutorial",xlabel="x",ylabel="y")
savefig(p,"p.png")
display(p)
sleep(10)
Error:
Code:
ERROR: LoadError: InitError: could not load library "/home/x/.julia/artifacts/ce9ecc22b48f5833c1b89a75263d1d57ab64585a/lib/libfreetype.so"
Shared object "libz.so.1" not found, required by "libfreetype.so"
ERROR: LoadError: Failed to precompile libass_jll
ERROR: LoadError: Failed to precompile FFMPEG_jll
ERROR: LoadError: Failed to precompile FFMPEG
ERROR: LoadError: Failed to precompile FFMPEG
Note this works fine on Artix-linux.

It is because julia from packages is built to use system zlib, which is libz.so.6, while the libraries in the artifacts are built against zlib shipped with julia, which is libz.so.1. Using patchelf to use libz.so.6 instead of libz.so.1 makes some libraries in the artifacts work, but some libraries demand zlib version not wrapped in the system zlib and do not work. You could either
  • Install matplotlib and use PyPlot.jl. (it works)
  • Install julia officially distributed from julialang.org.
 
Back
Top