Graphics.Graph: Fixed some infinite loops.

The step when assigning the axis lables could be smaller than the
mantissa allows, which caused infinite cpu and memory consumption.

This state is now detected and the loops terminated.

Fixes [LysLysKOM 20708162].