Can I choose display software?

I am using Julia on Debian and plotting SVG images using Gadfly. The default software used to display the image is my web browser which really doesn’t seem as the best option to me. Can I configure Julia/Gadfly to use another one (like inkview?).

I search for configurations but don’t find much.

You can load GitHub - queryverse/ElectronDisplay.jl: An Electron.jl based figure and table display. and then plots will be shown in an electron window.

Welcome to the Julia community!

It can be done by overriding this function like so:

using Compose, Gadfly

function Gadfly.display(d::Gadfly.GadflyDisplay, p::Union{Plot,Compose.Context})
    display(d, Gadfly.default_mime(), p)
    return
end

Then a test:

set_default_plot_format(:svg)
plot(x=1:10, y=rand(10), Geom.point)

import Cairo
set_default_plot_format(:pdf)
plot(x=1:10, y=rand(10), Geom.point)

The plot will open in whatever your default program for svg, pdf is.

3 Likes

That is what I was looking for, thank you.