
\input{ac2bIIIparameters}

\usetikzlibrary{positioning}

\pgfplotsset{every axis/.append style={width=2.1in, height=1.9in}}
%\pgfplotsset{every axis plot post/.append style={mark=none}}
\pgfplotsset{every axis/.append style={xtick=\empty}}
\pgfplotsset{every axis/.append style={ytick=\empty}}
\pgfplotsset{every axis/.append style={axis x line=top}}
\pgfplotsset{every axis/.append style={axis y line=left}}
\pgfplotsset{every axis/.append style={smooth}}
\pgfplotsset{every axis/.append style={ymin=-1}}
\pgfplotsset{every axis/.append style={ymax=0}}

  \begin{figure}[p]
	\begin{tikzpicture}[remember picture]
	\begin{axis}[title={$\phi(1)=\phiOne$},
                    every outer x axis line/.append style={-,gray},
                    every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=1] {ac2bIIIperm.dat}; \label{sigma1}
		\addplot[color=red,mark=none] table[x index=0,y index=10]{ac2bIIIperm.dat}; \label{sigma2}
		\addplot[color=olive,mark=none] table[x index=0,y index=19]{ac2bIIIperm.dat}; \label{sigma3}
        %\addplot[color=orange,dashed] table[x index=0,y index=1]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=1]{ac2bIIILongRun.dat}; \label{longrun1}
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=10]{ac2bIIILongRun.dat}; \label{longrun2}
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=19]{ac2bIIILongRun.dat}; \label{longrun3}
        \node (plotOne) {};
	\end{axis}
	\end{tikzpicture}
    \hspace{.15cm}
	\begin{tikzpicture}
	\begin{axis}[title={$\phi(1)=\phiTwo$}, every outer x axis line/.append style={-,gray},
                    every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=2]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=11]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=20]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=2]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=2]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=11]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=20]{ac2bIIILongRun.dat};
	\end{axis}
	\end{tikzpicture}
    \hspace{.15cm}
 	\begin{tikzpicture}
	\begin{axis}[title={$\phi(1)=\phiThree$}, every outer x axis line/.append style={-,gray},
                    every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=3]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=12]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=21]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=3]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=3]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=12]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=21]{ac2bIIILongRun.dat};
    \end{axis}
	\end{tikzpicture}
    \begin{tikzpicture}[remember picture,overlay]
        \node (first)[above left=1.7cm of plotOne] {$\rho=\rhoOne$};
        %\node [above= of plotOne.west] {0};
        \node [left=.5mm of plotOne.east] {-1};
        \node [above left=3.0cm and .5mm of plotOne.east] {0};
        \node [above right=3.0cm and 3.6cm of plotOne.east] {\mrun};
    \end{tikzpicture}

    \begin{tikzpicture}[remember picture]
    	\begin{axis}[every outer x axis line/.append style={-,gray},
                    every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=4]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=13]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=22]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=4]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=4]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=12]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=22]{ac2bIIILongRun.dat};
        \node (plotTwo) {};
	\end{axis}
    \end{tikzpicture}
    \hspace{.15cm}
    \begin{tikzpicture}
	\begin{axis}[every outer x axis line/.append style={-,gray},
                 every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=5]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=14]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=23]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=5]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=5]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=14]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=23]{ac2bIIILongRun.dat};
	\end{axis}
	\end{tikzpicture}
    \hspace{.15cm}
    \begin{tikzpicture}
	\begin{axis}[every outer x axis line/.append style={-,gray},
                 every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=6]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=15]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=24]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=6]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=6]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=15]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=24]{ac2bIIILongRun.dat};
	\end{axis}
	\end{tikzpicture}
    \begin{tikzpicture}[remember picture, overlay]
        \node (second) [above left=1.7cm of plotTwo]{$\rho=\rhoTwo$};
     %   \node (sigmaOne) [left=of second] {$\pi=2$};
    \end{tikzpicture}

    \begin{tikzpicture}[remember picture]
	\begin{axis}[every outer x axis line/.append style={-,gray},
                    every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=7]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=16]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=25]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=7]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=7]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=16]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=25]{ac2bIIILongRun.dat};
        \node (plotThree) {};
	\end{axis}
	\end{tikzpicture}
    \hspace{.15cm}
    \begin{tikzpicture}[remember picture]
	\begin{axis}[every outer x axis line/.append style={-,gray},
                 every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=8]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=17]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=26]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=8]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=8]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=17]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=26]{ac2bIIILongRun.dat};
        \node (plotFour) {};
	\end{axis}
	\end{tikzpicture}
    \hspace{.15cm}
    \begin{tikzpicture}
	\begin{axis}[every outer x axis line/.append style={-,gray},
                 every outer y axis line/.append style={-,gray}]
		\addplot[color=blue,mark=none] table[x index=0,y index=9]{ac2bIIIperm.dat};
		\addplot[color=red,mark=none] table[x index=0,y index=18]{ac2bIIIperm.dat};
		\addplot[color=olive,mark=none] table[x index=0,y index=27]{ac2bIIIperm.dat};
        %\addplot[color=orange,dashed] table[x index=0,y index=9]{ac2bpolicyperm.dat};
        \addplot[color=gray,dashed] coordinates
        {(1,-0.5) (\mrun,-0.5)};
        \addplot[color=blue,mark=diamond,only marks] table[x index=0, y index=9]{ac2bIIILongRun.dat};
        \addplot[color=red,mark=o,only marks] table[x index=0, y index=18]{ac2bIIILongRun.dat};
        \addplot[color=olive,mark=+,only marks] table[x index=0, y index=27]{ac2bIIILongRun.dat};
        \node (plotFive) {};
	\end{axis}
	\end{tikzpicture}
    \begin{tikzpicture}[remember picture,overlay]
        \node (three) [above left=1.7cm of plotThree] {$\rho=\rhoThree$};
    \end{tikzpicture}
    \begin{tikzpicture}[remember picture,overlay]
        %\node (time1) [below=.5mm of plotNine.west] {0};
       % \node (ninth) [above left=2mm of plotNine] {$\rho=\rhoThree$};
        %\node (time2) [below right=.5mm and 3.5cm of plotEleven.west] {\mrun};
        \node (text) [below right=2.5mm and .1mm of plotFour.north west] {Years since increase of $\phi(2)$};
        \node (legend) [below=5.4mm of text.north] {\begin{tabular}{cccccc}\ref{sigma1}\hspace{1mm}\ref{longrun1}& $\sigma=\sigOne$& \ref{sigma2}\hspace{1mm}\ref{longrun2} & $\sigma=\sigTwo$& \ref{sigma3}\hspace{1mm}\ref{longrun3}& $\sigma=\sigThree$\end{tabular}};
    \end{tikzpicture}
    
 \bigskip
 \bigskip
 \caption[below=2.5cm of legend] {Responses of Number of Firms to Raising $\phi(2)$ above $\phi(1)$.}\label{perm}


 \end{figure} 