gr: update padding constraints before first plot
This commit is contained in:
parent
78b0918216
commit
a5751895f0
@ -579,7 +579,7 @@ function gr_get_ticks_size(ticks, i)
|
||||
return l
|
||||
end
|
||||
|
||||
function gr_update_min_padding(sp::Subplot{GRBackend})
|
||||
function _update_min_padding!(sp::Subplot{GRBackend})
|
||||
# Add margin given by the user
|
||||
leftpad = 2mm + sp[:left_margin]
|
||||
toppad = 2mm + sp[:top_margin]
|
||||
@ -620,9 +620,8 @@ function gr_update_min_padding(sp::Subplot{GRBackend})
|
||||
sp.minpad = (leftpad, toppad, rightpad, bottompad)
|
||||
end
|
||||
|
||||
|
||||
function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
||||
gr_update_min_padding(sp)
|
||||
_update_min_padding!(sp)
|
||||
|
||||
# the viewports for this subplot
|
||||
viewport_subplot = gr_viewport_from_bbox(sp, bbox(sp), w, h, viewport_canvas)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user