function PlotLine(theta, pt1, pt2, color, width)
    % theta - 2D line parameters, length 3
    % pt1/pt2 - 2D points, length 2
    % color - RGB color of the line, vector of length 3 with values bewtween [0,1]
    % width - line width

    x = [];
    y = [];

    if abs(pt1(1) - pt2(1)) > abs(pt1(2) - pt2(2))
        x = min(pt1(1),pt2(1)):0.1:max(pt1(1),pt2(1));
        y = (-theta(3) - theta(1)*x) / theta(2);
    else
        y = min(pt1(2),pt2(2)):0.1:max(pt1(2),pt2(2));
        x = (-theta(3) - theta(2)*y) / theta(1);
    end

    fmt = strcat(color, "-");
    plot(x,y, "-", 'LineWidth', width, "Color", color);
