gr: use correct aspect ratio (fixes #1219)

This commit is contained in:
Josef Heinen 2017-11-02 20:12:11 +01:00
parent 671f5c3a68
commit f690961af2

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] -= (viewport[2] - viewport[1]) * 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()