Gaston: move update ratios to _update_plot_object
This commit is contained in:
parent
95804039f4
commit
01d5ff1580
@ -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"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user