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. – user30471 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

This might do as a starting point.

  \draw[-latex](0,0)--(0,10)node[anchor=north east]{%
  \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[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)$);

enter image description here

| improve this answer | |

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.