gr: fixed padding for guides

This commit is contained in:
Josef Heinen 2017-07-26 08:25:58 +02:00
parent 0dd5eef3f2
commit 00e05efd7c

View File

@ -538,7 +538,20 @@ end
function _update_min_padding!(sp::Subplot{GRBackend})
sp.minpad = (10mm,2mm,2mm,8mm)
leftpad = 10mm
toppad = 2mm
rightpad = 2mm
bottompad = 6mm
if sp[:title] != ""
toppad += 5mm
end
if sp[:xaxis][:guide] != ""
bottompad += 4mm
end
if sp[:yaxis][:guide] != ""
leftpad += 4mm
end
sp.minpad = (leftpad, toppad, rightpad, bottompad)
end