Merge pull request #1220 from jheinen/master

gr: use correct aspect ratio (fixes #1219)
This commit is contained in:
Josef Heinen 2017-11-02 22:15:30 +01:00 committed by GitHub
commit ed75369c6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,6 +412,9 @@ function gr_viewport_from_bbox(sp::Subplot{GRBackend}, bb::BoundingBox, w, h, vi
viewport[3] = 0.5 * (vp[3] + vp[4] - extent)
viewport[4] = 0.5 * (vp[3] + vp[4] + extent)
end
if hascolorbar(sp)
viewport[2] -= 0.1
end
viewport
end
@ -687,11 +690,6 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
end
end
if cmap
# note: add extra midpadding on the right for the colorbar
viewport_plotarea[2] -= 0.1
end
# set our plot area view
gr_set_viewport_plotarea()