Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to connect two figures like the followingenter image description here.

The code that I've already have is:

\documentclass{article}
\usepackage[english]{babel}
\usepackage{ucs} 
\usepackage[utf8x]{inputenc}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{tkz-tab}
\usepackage{cancel}
\usepackage{forest}
\usepackage{caption}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{paralist}
\usepackage{pst-tree,array}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{epstopdf}
\usepackage{rotating}
\usepackage[usenames,dvipsnames]{xcolor}

\usetikzlibrary{arrows}
\usetikzlibrary{intersections}


\begin{document}


\begin{tikzpicture}[scale=.6,>=latex,font=\footnotesize,domain=0:7]
\draw[thick, -] (4.5,3.5)--(7,8) node[above right]{$S$}; 
\draw[dashed] (4.5,3.5)--(0,3.5) node[left]{$P_{\min}$};
  \draw[very thick, <->](0,8)node[left]{$P$}--(0,0)--(8,0)node[below]{$Q$};

\begin{scope}[yshift=10cm,domain=1:7]

  %AVC
  \draw[thick,yscale=.6,name path global=avc] plot (\x,{.2*\x^2-1.8*\x+6})
    node[right]{$AVC$};

  %MC
  \draw[red,thick,yscale=.6,name path global=mc] plot (\x,{.6*\x^2-3.6*\x+6})
    node[right]{$MC$};
  \draw[very thick, <->](0,8)node[left]{$C$}--(0,0)--(8,0)node[below]{$Q$};
\end{scope}

  \draw[name intersections={of=mc and avc, by=mypoint},dashed](mypoint)--(mypoint|-0,0) node[below]{$Q_{\min}$};


\end{tikzpicture}
\end{document}

What I would like is to place one figure next to the other. How could I add the hook so as to show where the supply curve comes from and how the arrow at the point where AVC=MC?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Here is a suggestion using the decorations.pathreplacing libary for the brace:

\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{
  arrows,
  intersections,
  decorations.pathreplacing
}

\begin{document}
\begin{tikzpicture}[
  scale=.6,
  >=latex,
  font=\footnotesize,
  domain=1:7,
  decoration={brace,amplitude=10pt}
  ]
\def\myshift{10}% shift of the right diagram

\foreach \x/\ylabel in {0/C,\myshift/P}
  \draw[very thick, <->](\x,8)node[left]{$\ylabel$}--(\x,0)--(\x+8,0)node[below]{$Q$};
  %AVC
  \draw[thick,yscale=.6,name path global=avc,green!50!black] plot (\x,{.2*\x^2-1.8*\x+6})
    node[right]{$AVC$};
  %MC
  \draw[blue,thick,yscale=.6,name path global=mc] plot (\x,{.6*\x^2-3.6*\x+6})
    node[above right]{$MC$}coordinate(mc1);
  %intersection AVC and MC
  \path[name intersections={of=mc and avc, by=mp1},dashed,thick];
  %shutdown point
  \draw[<-](mp1)--+(-45:1)node[right,align=left,font=\tiny]{SHUTDOWN\\POINT};
  %dashed lines
  \foreach \p in {mc,mp}
    \draw[dashed](\p1)--+(\myshift,0)coordinate(\p2);
  \foreach \i in {1,2}
    \draw[dashed,thick](mp\i)--(mp\i|-0,0) node[below]{$Q_{\min}$};
  %brace
  \draw[decorate](mp1)--node[above left,align=left,font=\tiny,outer xsep=3mm]{SUPPLY\\CURVE}(mc1);
  %lila arrow
  \draw[blue!50!red,->,thick,shorten >=1mm,shorten <=1mm]([xshift=5mm]mp1)--([xshift=5mm]mc1);
  %red line
  \draw[red,thick](mp2)--(mc2)node[below right]{$S$};
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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