I would happy to get some help since its quite urgent.
I'm trying to have two graphs one next to each other (preferably sub graph). The only time I was close was when they were not in the same level and one was out of the margins.
I'm attaching the two graphs, will appreciate any help.
Code: Select all
\documentclass{article}
\usepackage[margin=1.5in]{geometry}
\usepackage{amsmath,multirow,booktabs, caption, boldline, cellspace,array,multirow,tikz,scrextend,float,pgfplots,amssymb,setspace,apacite,amsthm,inputenc,}
\usepackage[format=hang,font=small,labelfont=bf]{caption}
\usepackage[T1]{fontenc}
\usepackage{mwe} % loads »blindtext« and »graphicx«
\usepackage{subfig}
%preamble:
\onehalfspacing
\makeatletter
\newenvironment{tikzlegend}[1][]{%
\begingroup
\csname pgfplots@init@cleared@structures\endcsname
\pgfplotsset{#1}}{\csname pgfplots@createlegend\endcsname
\endgroup
}
\def\addlegendimage{\csname pgfplots@addlegendimage\endcsname}
\makeatother
\author{}
\title{}
\begin{document}
%content:
\maketitle %prints preamble material onto pdf
\begin{figure}[H]
\centering
\begin{tikzpicture}
\tikzstyle{every node}=[font=\huge]
\end{tikzpicture}
\begin{tikzpicture}
\draw[semithick,->] (0,0) -- (7.6,0) node[right] {$ \alpha $};
\draw[semithick,->] (0,0) -- (0,6) node[above] {$ SW^{ea}, SW^{ed} $};
\path[thick,cyan,draw] (0,5.4) node[right]{} .. controls (1,3) .. (2.8,2.5);
\path[thick,densely dotted,draw] (2.8,5.4) node[right]{} .. controls (3.8,2.1) .. (5.6,2);
\path[thin,densely dashdotted,draw,purple] (0,2) node[left]{\small$SW^{monopoly}$} .. controls (4,2) .. (7.2,2);
\path[thin,dashed,draw] (2.3,4.4) node[left]{\small$SW^{ea}(\alpha) $} .. controls (2.3,4.4) .. (2.3,4.4);
\path[thin,dashed,draw] (5.6,4.4) node[left]{\small$ SW^{ed}(\alpha, \hat f_t, c_t$)} .. controls (5.6,4.4) .. (5.6,4.4);
\path[thick,loosely dotted,draw] (0,5.4) node[below]{\small} .. controls (0,5.4) .. (5.6,5.4);
\path[thick,dashed,draw] (5.6,0) node[below]{\small$\alpha_{max}$} .. controls (5.6,2) .. (5.6,5.6);
\path[thick,dashed,draw] (2.8,0) node[below]{\small$\hat\alpha_t$} .. controls (2.8,2) .. (2.8,5.6);
\path[thin,loosely dashdotted,draw] (0,5.4) node[left]{\small$\frac{15a^2}{32}$} .. controls (0,5.4) .. (0,5.4);
\end{tikzpicture}
\caption{\bf{Diagrammatic representation of Lemma 3}}
\end{figure}
\begin{figure}[H]
\centering
\begin{tikzpicture}
\tikzstyle{every node}=[font=\huge]
\end{tikzpicture}
\begin{tikzpicture}
\draw[semithick,->] (0,0) -- (7.6,0) node[right] {$ f$};
\draw[semithick,->] (0,0) -- (0,6) node[above] {$ SW^{ea}, SW^{ed} $};
\path[thick,cyan,draw] (0.5,0.5) node[right]{} .. controls (3,4) .. (6.4,4.7)node[right]{$SW^{ed}(\hat\alpha, f, c_l)$};
\path[thick,dotted,draw] (2,0.5) node[right]{} .. controls (3.5,3) .. (6.4,3.8)node[right]{$SW^{ed}(\hat\alpha, f, c_h)$};
\path[thin,densely dashdotted,draw,purple] (0,2) node[left]{$\frac{15a^2}{32}$} .. controls (4,2) .. (7.2,2)node[right]{\small$SW^{ea}(\alpha=0)$};
\path[thick,dashed,draw] (3,0) node[below]{$\hat f_h$} .. controls (3,2) .. (3,2);
\path[thick,dashed,draw] (1.6,0) node[below]{$\hat f_l$} .. controls (1.6,2) .. (1.6,2);
\end{tikzpicture}
\caption{\bf{Diagrammatic representation of Lemma 3}}
\end{figure}
\end{document}