From 01d5ff1580aced0a27669880b296c8d993a7f734 Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Fri, 30 Jul 2021 00:20:38 +0200 Subject: [PATCH] Gaston: move update ratios to _update_plot_object --- src/backends/gaston.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backends/gaston.jl b/src/backends/gaston.jl index 2de7724a..f2789a1a 100644 --- a/src/backends/gaston.jl +++ b/src/backends/gaston.jl @@ -50,7 +50,11 @@ function _update_min_padding!(sp::Subplot{GastonBackend}) sp.minpad = (20mm, 5mm, 2mm, 10mm) end -_update_plot_object(plt::Plot{GastonBackend}) = nothing +function _update_plot_object(plt::Plot{GastonBackend}) + # respect the layout ratio + w_h = gaston_widths_heights(plt.layout, 1, 1) + gaston_widths_heights!(0, plt, w_h) +end for (mime, term) in ( "application/eps" => "epscairo", # NEED fixing TODO @@ -79,10 +83,6 @@ end function _show(io::IO, mime::MIME{Symbol("image/png")}, plt::Plot{GastonBackend}) scaling = plt.attr[:dpi] / Plots.DPI - # try to respect the layout ratio - w_h = gaston_widths_heights(plt.layout, 1, 1) - gaston_widths_heights!(0, plt, w_h) - # Scale all plot elements to match Plots.jl DPI standard saveopts = "fontscale $scaling lw $scaling dl $scaling ps $scaling"