Plots.jl icon indicating copy to clipboard operation
Plots.jl copied to clipboard

[BUG] Axis Labels/Guides Are Out of Borders (Not Visible) On Specific Chart Sizes

Open EldarAgalarov opened this issue 2 years ago • 2 comments

Axis label positions that can be set via xguide and yguide arguments are dependant on chart size:

On default chart size guides are ok:

plot(
    Plots.fakedata(50, 5), 
    w = 3,
    xguide = "xGuide",
    yguide = "yGuide"
)

image

On custom size guides are out of chart canvas:

plot(
    Plots.fakedata(50, 5), 
    w = 3,
    xguide = "xGuide",
    yguide = "yGuide",
    size = (900, 300)
)

image

Plots.jl version: 1.33.0 Backend: GR Julia version: 1.8.1

EldarAgalarov avatar Sep 15 '22 18:09 EldarAgalarov

Similar issue

EldarAgalarov avatar Sep 15 '22 19:09 EldarAgalarov

I agree that it would be better to automatically have the margins fit, but the way you solve this is by increasing the margins e.g.

plot(
    Plots.fakedata(50, 5), 
    w = 3,
    xguide = "xGuide",
    yguide = "yGuide",
    size = (900, 300),
    margin = 2Plots.cm
)

BeastyBlacksmith avatar Sep 16 '22 06:09 BeastyBlacksmith