Add paddings to the side where the axis label is
This commit is contained in:
parent
89d08606ad
commit
6be7995500
@ -602,12 +602,20 @@ function _update_min_padding!(sp::Subplot{GRBackend})
|
|||||||
end
|
end
|
||||||
# Add margin for x label
|
# Add margin for x label
|
||||||
if sp[:xaxis][:guide] != ""
|
if sp[:xaxis][:guide] != ""
|
||||||
|
if sp[:xaxis][:guide_position] == :top || (sp[:xaxis][:guide_position] == :auto && sp[:xaxis][:mirror] == true)
|
||||||
|
toppad += 4mm
|
||||||
|
else
|
||||||
bottompad += 4mm
|
bottompad += 4mm
|
||||||
end
|
end
|
||||||
|
end
|
||||||
# Add margin for y label
|
# Add margin for y label
|
||||||
if sp[:yaxis][:guide] != ""
|
if sp[:yaxis][:guide] != ""
|
||||||
|
if sp[:yaxis][:guide_position] == :right || (sp[:yaxis][:guide_position] == :auto && sp[:yaxis][:mirror] == true)
|
||||||
|
rightpad += 4mm
|
||||||
|
else
|
||||||
leftpad += 4mm
|
leftpad += 4mm
|
||||||
end
|
end
|
||||||
|
end
|
||||||
if sp[:colorbar_title] != ""
|
if sp[:colorbar_title] != ""
|
||||||
rightpad += 4mm
|
rightpad += 4mm
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user