0

I am trying to draw a Keynesian AS diagram for my economics coursework. How can I draw it using TikZ (or any other package)? I have tried the controls modifier but it couldn't produce a "sharp" curve.

This is the graph I'm trying to draw: enter image description here

As you can see, the text box for the dotted lines obstruct the curve.

  • Welcome to TeX.SE! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Troy May 30 '17 at 6:02
  • 3
    Not many people on TeX.SX will know what a "Keynesian AS diagram" so when you add your minimal working example it would be helpful if you can explain what this diagram should look like. – Andrew May 30 '17 at 7:52
  • I know I should add a MWE but the thing is, I don't know where to start. The sample photo was drawn using Microsoft Word. @Troy – Victor Z May 30 '17 at 12:06
  • 1
    For this graph you probably want to use data visualization with the TikZ package. Pgfplots does a lot of things you don't really need, like computing the scale to fit the data. – John Kormylo May 30 '17 at 13:54
4

This might do as a starting point.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}
  \draw[-latex](0,0)--(10,0)node[below]{%
    \begin{tabular}{l}
      Real\\GDP
    \end{tabular}};
  \draw[-latex](0,0)--(0,10)node[anchor=north east]{%
    \begin{tabular}{l}
      General\\Price\\Level
    \end{tabular}};
  \coordinate(P1) at (0,4);
  \coordinate(AS1) at (3.5,8);
  \coordinate(AS2) at (6,8);
  \draw(0.5,7) -- +(6,-6)node[right]{$\text{AD}_1$};
  \draw(1,9) -- +(8,-8)node[right]{$\text{AD}_2$};
  \draw[-latex](1.5,6.5)--+(1.6,0);
  \draw[dashed]({(0,0)} -| AS1)node[below]{$\text{Y}_1$} -- (AS1);
  \draw[thick,rounded corners=7mm](P1) -| (AS1)node[above]{$\text{AS}_1$};
  \draw[dashed]({(0,0)} -| AS2)node[below]{$\text{Y}_2$} -- (AS2);
  \draw[thick,rounded corners=7mm](P1) -| (AS2)node[above]{$\text{AS}_2$};
  \draw[-latex]($(AS1)+(0.3,-1)$) -- ($(AS2)+(-0.3,-1)$);
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.