GR Makie

pkg"up; add Makie#sd-nogl AbstractPlotting#cs/backends https://github.com/JuliaPlots/GRMakie.jl.git GR#master"
using GR, GRMakie, AbstractPlotting
using GRMakie: GRBackend, draw

# for inline display
function AbstractPlotting.backend_display(::GRBackend, scene::Scene)
    AbstractPlotting.update!(scene)
    ENV["GKS_DOUBLE_BUF"] = true
    GR.clearws()
    draw(scene)
    GR.updatews()
end

# For opening a gui
function AbstractPlotting.backend_show(::GRBackend, io::IO, ::MIME"image/svg+xml", scene::Scene)
    AbstractPlotting.update!(scene)
    oldmime = get(ENV, "GKSwstype", "svg")
    GR.emergencyclosegks()
    ENV["GKSwstype"] = "svg"
    ENV["GKS_FILEPATH"] = tempname() * ".svg"
    GR.clearws()
    draw(scene)
    GR.updatews()
    GR.emergencyclosegks()
    ENV["GKSwstype"] = oldmime
end
pkg"build GR"
using Makie
GRMakie.activate!()
AbstractPlotting.use_display[] = false
ENV["GKSwstype"] = "svg"
Makie.scatter(rand(10), rand(10))
_
© 2018 Nextjournal GmbH