Merge pull request #3350 from daschw/gr-aspect

fix aspect_ratio in GR with legend=:outertopright
This commit is contained in:
Daniel Schwabeneder 2021-03-16 10:39:23 +01:00 committed by GitHub
commit f76390c20d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -908,9 +908,9 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
viewport_plotarea = gr_viewport_from_bbox(sp, plotarea(sp), w, h, viewport_canvas)
# update viewport_plotarea
gr_update_viewport_ratio!(viewport_plotarea, sp)
leg = gr_get_legend_geometry(viewport_plotarea, sp)
gr_update_viewport_legend!(viewport_plotarea, sp, leg)
gr_update_viewport_ratio!(viewport_plotarea, sp)
# fill in the plot area background
gr_fill_plotarea(sp, viewport_plotarea)