Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
1.1 kB
4
Indexable
Never
\documentclass{standalone}
�ckage{tikz}
�ckage{pgfplots}

\begin{document}

\begin{tikzpicture}
    \begin{axis}[
        axis lines = middle,
        xlabel = {Pizza (per hour)},
        ylabel = {Pasta (per hour)},
        xmin = 0, xmax = 10,
        ymin = 0, ymax = 10,
        xtick = {0, 2, 4, 6, 8, 10},
        ytick = {0, 2, 4, 6, 8, 10},
        grid = both,
        width = \textwidth,
        height = 0.6\textwidth,
        samples = 100,
        domain = 0:10
    ]
    
    % PPF curve
    \addplot[thick, domain=0:10] ({x}, {10-x^2/10});
    \
ode at (axis cs:10,0) [right] {PPF};
    
    % Attainable points
    \filldraw[blue] (axis cs:2,9.6) circle (2pt) node[anchor=west] {Attainable};
    \filldraw[blue] (axis cs:4,8.4) circle (2pt) node[anchor=west] {Attainable};
    \filldraw[blue] (axis cs:6,6.4) circle (2pt) node[anchor=west] {Attainable};
    \filldraw[blue] (axis cs:8,3.6) circle (2pt) node[anchor=west] {Attainable};
    
    % Unattainable point
    \filldraw[red] (axis cs:6,8) circle (2pt) node[anchor=west] {Unattainable};
    
    \end{axis}
\end{tikzpicture}

\end{document}
Leave a Comment