Daniel B. answered 12/13/21
A retired computer professional to teach math, physics
The relevant formula is
T = 2π√(L/g)
where
L is the length of the pendulum,
g is gravitational acceleration,
T is the period of the pendulum.
That is also the formula you should use for your other question about planet X.
Equivalently the formula can be written
T² = 4π²L/g
And that is apparently the formula you are referring to when saying
that T² depends linearly on L.
The graph of T² vs L will be a straight line with positive slope on any planet.
The slope is 4π²/g.
The reason is that the dependence of T² on L can be written as
T² = (4π²/g)L
On another planet with higher gravity the slope will be less steep.
In other words, it is the opposite to your expectation; perhaps that is the confusion.
If you go to another planet with gravity 4 times stronger,
your pendulum's period will be cut in half.
Or equivalently, the pendulum will oscillate twice as fast.