diff --git a/src/backends/gr.jl b/src/backends/gr.jl index be46ff295..fe52a8955 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -780,10 +780,10 @@ function _update_min_padding!(sp::Subplot{GRBackend}) end end # Add margin given by the user - leftpad = 2mm + sp[:left_margin] - toppad = 2mm + sp[:top_margin] - rightpad = 2mm + sp[:right_margin] - bottompad = 2mm + sp[:bottom_margin] + leftpad = sp[:left_margin] + toppad = sp[:top_margin] + rightpad = sp[:right_margin] + bottompad = sp[:bottom_margin] # Add margin for title if sp[:title] != "" gr_set_font(titlefont(sp), sp) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index d6a6b5e39..5b853e289 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -105,6 +105,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend}) "show background rectangle" => nothing, ) end + push!(the_plot.options, "tight background" => nothing) for sp in plt.subplots bb2 = bbox(sp) diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index ad4ff3170..191dfb8ac 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -211,7 +211,7 @@ function plotly_layout(plt::Plot) w, h = plt[:size] plotattributes_out[:width], plotattributes_out[:height] = w, h plotattributes_out[:paper_bgcolor] = rgba_string(plt[:background_color_outside]) - plotattributes_out[:margin] = KW(:l => 0, :b => 20, :r => 0, :t => 20) + plotattributes_out[:margin] = KW(:l => 0, :b => 0, :r => 0, :t => 0) plotattributes_out[:annotations] = KW[]