% 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)
        (3,4) (4,4) (5,2) (4,1) (2,1)} -- cycle;
        % Constraints
        % -x + 2y = 5
        \addplot[mark=none,dashed] {(x +5)/2};
        % y = 4
        \addplot[mark=none,dashed,domain={0:6}] {4};
        % 2x + y = 12
        \addplot[mark=none,dashed,domain={0:6}] {-2*x + 12};
        % x - y = 3
        \addplot[mark=none,dashed,domain={0:6}] {x - 3};
        % y = 1
        \addplot[mark=none,dashed,domain={0:6}] {1};
        % x + y = 3
        \addplot[mark=none,dashed,domain={0:6}] {-x + 3};
        % x = 1
        \addplot[mark=none,dashed] coordinates {(1, 0) (1,5.3)};
        
        % Points
        \addplot[only marks,mark=o] coordinates {
                        (3,4) (4,4)
            (1,3) (2,3) (3,3) (4,3) 
            (1,2) (2,2) (3,2) (4,2) (5,2)
                  (2,1) (3,1) (4,1) 
        };
    \end{axis} 
\end{tikzpicture}