 x1 < spline_xs[2]){
            y1 = polynomial_in_x(X1, x1, 4);
            y2 = polynomial_in_x(X1, x2, 4);
            spline_context.moveTo(x_to_client(x1), y_to_client(y1));
            spline_context.lineTo(x_to_client(x2), y_to_client(y2));
        }
        if(x1 > spline_xs[2] && x1 < spline_xs[4]){
            y1 = polynomial_in_x(X2, x1, 4);
            y2 = polynomial_in_x(X2, x2, 4);
            spline_context.moveTo(x_to_client(x1), y_to_client(y1));
            spline_context.lineTo(x_to_cli