From 3be9b8d076e018baf788a8f4304cbc22c6230393 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 3 May 2020 14:45:30 +0200 Subject: [PATCH] fix outer legend font size --- src/backends/gr.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index 9dc579d5..9041b4b2 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -763,6 +763,7 @@ function gr_convert_sci_tick_label(label) end function gr_axis_height(sp, axis) + GR.savestate() ticks = get_ticks(sp, axis) gr_set_font(tickfont(axis), sp) h = (ticks in (nothing, false, :none) ? 0 : last(gr_get_ticks_size(ticks, axis[:rotation]))) @@ -770,10 +771,12 @@ function gr_axis_height(sp, axis) gr_set_font(guidefont(axis), sp) h += last(gr_text_size(axis[:guide])) end + GR.restorestate() return h end function gr_axis_width(sp, axis) + GR.savestate() ticks = get_ticks(sp, axis) gr_set_font(tickfont(axis), sp) w = (ticks in (nothing, false, :none) ? 0 : first(gr_get_ticks_size(ticks, axis[:rotation]))) @@ -781,6 +784,7 @@ function gr_axis_width(sp, axis) gr_set_font(guidefont(axis), sp) w += last(gr_text_size(axis[:guide])) end + GR.restorestate() return w end