Legend grows outside the image

I realized that when using Plots with GR the legend can grow outside the image.
Is there a way to center the legend?
The right edge of the legend seems to be fixed at the center of the image as it grows.

plot(rand(10),rand(10),label="abc"^15,legend=:outerbottom)

Try this:

using Plots, Measures
plot(rand(10),rand(10),label="abc"^15, bottommargin=1.5cm, legend_position=(0.25,-0.15))

1 Like