%\subsection{Equilibrium without Thresholds}
%  The plot of continuation values from the example equilibrium without threshold-based strategies uses the data created by |equilibriumWithoutThresholds.m| and saved in
%\begin{itemize}
%\item |pgfTikZ/equilibriumWithoutThresholdsV11.csv|
%\item |pgfTikZ/equilibriumWithoutThresholdsV12.csv|
%\item |pgfTikZ/equilibriumWithoutThresholdsV2.csv|
%\item |pgfTikZ/equilibriumWithoutThresholdsConstants.tex|
%\end{itemize}
%Just as with the pencil-and-paper example, the code below resides in |/compute/pgfTikZ| and requires certain macros defined by this last file to be in place. \footnote{Again, the ``file ac2aNoThresholdsColor.tex| within |compute| is only a link to the file used by LaTeX when compiling the program.}

%\subsubsection{Top Panel}
% We place no labelled tick marks on the horizontal axis to make room for the illustration of the entry set. Otherwise,  the formatting of the top panel is pretty similar to that from the pencil-and-paper example.
   \begin{axis}[width=4.5in,height=2.5in,
        title=First Entrant's Value Function,
        name=v1,
        ylabel={},
        axis x line=bottom,
        every outer x axis line/.append style={-,color=gray,line width=0.75pt},
        axis y line=left,
        every outer y axis line/.append style={-,color=gray,line width=0.75pt},
        xtick={\chat,\ccheck},
        xticklabels={},
        ytick={0,\phione,\ymax},
        yticklabels={$0$,\makebox[0pt][r]{$\varphi(1)=\phione$},$\pgfmathprintnumber{\ymax}$},
        major tick length=2.5mm,
        every tick/.append style={line width=0.75pt},
        ymin=0,
        ymax=\ymax,
        scaled ticks=false,
        scaled ticks=false,
        /pgf/number format/precision=2,
        /pgf/number format/set thousands separator={}]
%Place the text describing the entry rule into the top panel.
        \node[color=black] at (axis cs:0.65,6) {Enter if $\ln C\in \cal{A}\cup \cal{B}$};
 %Draw a horizontal line at the cost of entry
        \draw[color=gray,line width=0.75pt,dashed] (axis cs:\chat,\phione) -- (axis cs:\ccheck,\phione);
%Create the two value-function ``branches'' for an incumbent with rank 1.
        \addplot[color=black,mark=square*,only marks,mark size=0.05mm] table[x=C,y=v11,col sep=comma]{equilibriumWithoutThresholdsV11.csv};
        \addplot[color=red!75,mark=square*,only marks,mark size=0.05mm] table[x=C,y=v12,col sep=comma]{equilibriumWithoutThresholdsV12.csv};

%This is complicated enough to merit a legend. Note that its location is hard-wired. Changing the example might make this poorly placed.
        \draw[color=black,line width=0.75pt] (axis cs: -1.3,35) -- (axis cs: -1.05,39) (axis cs: -1.05,36)--(axis cs:-0.925,38) (axis cs: -0.5,38) node{Monopoly Branch};
         \draw[color=red!75,line width=0.75pt] (axis cs: -1.3,30) -- (axis cs: -1.05,34) (axis cs: -1.05,31)--(axis cs:-0.925,33) (axis cs: -0.5,33) node[color=black]{Duopoly Branch};
%Mark locations for drawing the entry set. We do the actual drawing below (outside of the axis environment) to avoid having our beautiful work being clipped.
        \path(axis cs:\chat,0) coordinate (Chat);
        \path(axis cs:\ccheck,0) coordinate (Ccheck);
        \path(axis cs:\Alow,0) coordinate (Alow);
        \path(axis cs:\Ahigh,0) coordinate (Ahigh);
        \path(axis cs:\Clow,0) coordinate (Clow);
        \path(axis cs:\Chigh,0) coordinate (Chigh);

    \end{axis}
%Draw the entry set.
    \draw[color=green!20!white,line width=10pt] (Alow) -- node[midway,above,color=black]{$\cal A$} (Ahigh);
    \draw[color=green!20!white,line width=10pt] (Clow) -- node[midway,above,color=black]{$\cal B$} (Chigh);
%The entry set just covered the horizontal axis, so we need to redraw it and its tick marks.
    \draw[color=gray,line width=0.75pt](Alow)--(Chigh);
 %Draw a tick mark at Ccheck and label it.
    \draw[color=gray,line width=0.75pt](Ccheck) ++(0,1.25mm) -- ++ (0,-2.5mm) ++ (0,-3mm) node[color=black]{\makebox[0pt][r]{$\ln \check C = \ccheck$}};
%Draw a tick mark at Chat and label it.
    \draw[color=gray,line width=0.75pt] (Chat) ++ (0,1.25mm) -- ++ (0,-2.5mm) ++ (0,-2.5mm)
    node[color=black]{\makebox[0pt][l]{$\ln \hat C = \chat$}};
 %Draw a tick mark at Ahigh and label it with its value.
    \draw[color=gray,line width=0.75pt] (Ahigh) ++(0,1.25mm) -- ++ (0,-2.5mm) ++(0,-3mm) node[color=black]{$\pgfmathprintnumber{\Ahigh}$};

%\subsubsection{Bottom Panel}
% The bottom panel's construction involves considerably less coding. We begin by choosing its location.
    \path(v1.origin) ++(0,-2.5in) coordinate (v2 plot position);
%The formatting of the axis is straightforward.
    \begin{axis}[width=4.5in,height=2.5in,
        title=Second Entrant's Value Function,
        name=v2,
        at = {(v2 plot position)},
        anchor={origin},
        ylabel={},
        axis x line=bottom,
        every outer x axis line/.append style={-,color=gray,line width=0.75pt},
        axis y line=left,
        every outer y axis line/.append style={-,color=gray,line width=0.75pt},
        xtick={\chat,\cunderbartwo,\coverbartwo,\ccheck},
        xticklabels={\makebox[0pt][r]{},\raisebox{-2.8mm}{$\ln \underline C_2 = \pgfmathprintnumber{\cunderbartwo}$},\makebox[0pt][c]{$\ln \overline C_2 = \pgfmathprintnumber{\coverbartwo}$},\makebox[0pt][r]{}},
        ytick={0,\phitwo,\ymax},
        yticklabels={$0$,\makebox[0pt][r]{$\varphi(2)=\phitwo$},$\pgfmathprintnumber{\ymax}$},
        major tick length=2.5mm,
        every tick/.append style={line width=0.75pt},
        ymin=0,
        ymax=\ymax,
        scaled ticks=false,
        /pgf/number format/precision=2,
        /pgf/number format/set thousands separator={}]
%Draw a horizontal line at the cost of entry.
        \draw[color=gray,line width=0.75pt,dashed] (axis cs:\chat,\phitwo) -- (axis cs:\ccheck,\phitwo);
%Plot the value function for an incumbent with rank 2 and close the axis.
        \addplot[color=black,line width=1pt] table[x=C,y=v2,col sep=comma]{equilibriumWithoutThresholdsV2.csv};

    \end{axis} 
