Maths solve problems with line plots