% TeX root = ../main.tex

\begin{tikzpicture}[scale=0.5]
    \begin{axis}[
        axis lines = center,
        axis on top,
        xmin=0,
        xmax=6.3,
        ymin=0,
        ymax=5.3,
        y=1cm,
        x=1cm,
        ytick={0,...,5},
        xtick={0,...,6},
        xlabel = x,
        ylabel = y,
        font=\tiny
    ]
        % Octagon
        \addplot[mark=none,draw=black,fill=rwth-50] coordinates {(1,2) (1,3)
        (2,4) (4,4) (5,3) (3,1) (2,1)} -- cycle;
        % Constraints
        % x = 1
        \addplot[mark=none,dashed] coordinates {(1, 0) (1,5.3)};
        % -x + y = 2
        \addplot[mark=none,dashed] {x + 2};
        % y = 4
        \addplot[mark=none,dashed,domain={0:6}] {4};
        % x + y = 8
        \addplot[mark=none,dashed,domain={0:6}] {-x + 8};
        % -x + y = -2
        \addplot[mark=none,dashed,domain={0:6}] {x - 2};
        % y = 1
        \addplot[mark=none,dashed,domain={0:6}] {1};
        % x + y = 3
        \addplot[mark=none,dashed] {-x + 3};
        
        % Points
        \addplot[only marks,mark=o] coordinates {
                  (2,4) (3,4) (4,4)
            (1,3) (2,3) (3,3) (4,3) (5,3)
            (1,2) (2,2) (3,2) (4,2) 
                  (2,1) (3,1) 
        };
    \end{axis} 
\end{tikzpicture}