Is there any plot package that is "relocatable"?

I’m trying to compile a simple app that depends on Plots.jl and the GR backend using PackageCompiler.jl. I get warnings about Plots and GR being not relocatable. If I ignore the warnings, indeed the app doesn’t run in my friend’s computer because it references paths on my computer.

Is there any Plots.jl backend or different plot package (Gadfly? VegaLite?) that is relocatable so I can compile the app correctly and share the executable with a friend?

1 Like

Our of curiosity, is there a particular reason you would like to give your friend an app and not let your friend use the Julia package itself via normal Julia Package tools?

2 Likes

Well, it’s more like a test. Actually, my friend has Julia installed in his computer… but eventually I would need to run my Julia code in systems where I can’t install software, so I’d like to be able to create apps that doesn’t requiere a Julia install.

I think Makie should be, because all of its binary dependencies are JLL packages (as far as I know). I think that would be the issue with GR. If you are going to do much plotting with Makie, I’d use MakieLayout too.

1 Like

Can you ship a Docker image on those systems?

1 Like

I’m not sure, but sounds like a good idea. I have little experience with Docker, but I’ll give it a try if Makie doesn’t work.

Gadfly has a pure-julia SVG backend available. No binaries involved, so it should be relocatable. Just make sure you don’t also have Cairo.jl available in the environment or it will attempt to use cairo for the plot instead.

1 Like

Is there a way to force Gadfly.jl to always use the pure-Julia SVG backend, even if Cairo.jl is available in the environment?

Looking at the code, I believe I was wrong and the pure-julia backend is always used for SVG. Obviously if you use PackageCompiler.jl on an environment that includes it though it will include Cairo in the output.

1 Like

Recently, I found Gaston.jl. It has a few dependencies and is relocatable, so the compiled bundle is smaller and doesn’t show warnings in computers without Julia installed.

I managed to compile GMDApp with Gaston.jl and PackageCompiler.jl. GMDApp is a Julia program for ground motion selection that shows a log-log plot of spectral acceleration.

1 Like

Thanks for the idea regarding Gaston.jl!
Sadly, it requires gnuplot that is usually not installed on a computers using the Microsoft Windows operating system. I saw that there is a download of an installation package of gnuplot for Windows, but it is not from an official repository and the installation of unofficial software on servers of the company where I work could cause conflicts with the IT security department.

The post is already around 3 years old.
Meanwhile, are there other alternative libraries for creating plots in apps that can be relocated by using PackageCompiler.jl?

I think Makie.jl is relocatable, but I’m not 100% sure.

I think at least in theory VegaLite should only use jll type dependencies. I’m not sure whether that is enough to make it relocatable, but probably worth trying and if there are issues we should try to fix them.