From e16e46db47bad08b29590175ac8548001a5a801d Mon Sep 17 00:00:00 2001 From: t-bltg Date: Thu, 29 Jul 2021 18:40:55 +0200 Subject: [PATCH] Gaston: debug mplot --- .github/workflows/docs.yml | 2 +- src/backends/gaston.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 23fcd9c2..aba47de8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -47,7 +47,7 @@ jobs: PYTHON: "" DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} run: | - # export JULIA_DEBUG=Documenter + export JULIA_DEBUG=Documenter export PLOTDOCS_ANSICOLOR=true export GKSwstype=nul # Plots.jl/issues/3664 xvfb-run julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.add(PackageSpec(name="Plots", rev=split(ENV["GITHUB_REF"], "/", limit=3)[3])); Pkg.instantiate()' diff --git a/src/backends/gaston.jl b/src/backends/gaston.jl index 1ad9248a..063ddd8d 100644 --- a/src/backends/gaston.jl +++ b/src/backends/gaston.jl @@ -12,7 +12,7 @@ const GNUPLOT_DPI = 72 # Compensate for DPI with increased resolution # Create the window/figure for this backend. function _create_backend_figure(plt::Plot{GastonBackend}) xsize, ysize = plt.attr[:size] - G.set(termopts="""size $xsize,$ysize""") + # G.set(termopts="size $xsize,$ysize") state_handle = G.nexthandle() # for now all the figures will be kept plt.o = G.newfigure(state_handle) @@ -89,14 +89,14 @@ function _show(io::IO, mime::MIME{Symbol("image/png")}, plt::Plot{GastonBackend} xsize, ysize = plt.attr[:size] .* scaling # Scale all plot elements to match Plots.jl DPI standard - termopts = """size $xsize,$ysize fontscale $scaling lw $scaling dl $scaling ps $scaling""" + termopts = "size $xsize,$ysize fontscale $scaling lw $scaling dl $scaling ps $scaling" tmpfile = G.tempname() G.save( term="pngcairo", output=tmpfile, handle=plt.o.handle, - saveopts=termopts + # saveopts=termopts ) while !isfile(tmpfile) end # avoid race condition with read in next line write(io, read(tmpfile))