grapher: fix Y axis padding calculation

[#54566454]