I'm trying to add comments under my graph when using Beamer for presentation.
It works fine on article but not with the presentation environment.
I marked on the attached file where the problem starts.
Any ideas what I should do?
Since the page doesn't let me add the file I'm attaching my command here.
Thanks!!!
Code: Select all
\documentclass [beamer]
{beamer}
\mode<presentation>{}
\usepackage{tikz, pgfplots}
\usetikzlibrary{shadows}
%% preamble
\title{Topic}
\subtitle{Name}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}[t,fragile]
\begin{center}
\frametitle{Monopolist strategy}
\begin{tikzpicture}
\tikzstyle{every node}=[font=\huge]
\end{tikzpicture}
\begin{tikzpicture}
\draw[semithick,->] (0,0) -- (7,0) node[right] {$ \alpha $};
\draw[semithick,->] (0,0) -- (0,5) node[above] {$ \pi_m $};
\path[thick,cyan,draw] (0,0) node[right]{} .. controls (4,4) .. (6.4,4);
\path[thick,dotted,draw] (0,0) node[right]{} .. controls (2.4,4) .. (5.6,4);
\path[thick,dashed,draw] (4.4,0) node[below]{\small$ \alpha{'}_{max}$} .. controls (4.4,0) .. (4.4,4);
\path[thick,dashed,draw] (1.2,0) node[below]{\small$\hat{ \alpha}{'}$} .. controls (1.2,1.95) .. (1.2,1.95);
\path[thick,dashdotted,draw,purple] (0,1.65) node[left]{\small$ \pi^{ea}$} .. controls (1.262,2) .. (5.64,3);
\path[thick,dashed,draw] (5.6,4) node[above]{} .. controls (5.6,0) .. (5.6,0);
\path[thick,dashed,draw] (6,0) node[below]{\small$ \alpha_{max}$} .. controls (6,0) .. (6,0);
\path[thick,dashed,draw] (2.262,0) node[below]{\small$\hat{\alpha}$} .. controls (2.262,2.2) .. (2.262,2.2);
%The proble starts when I try to add the followiing:
\begin{tikzlegend}[legend entries={\small monopolist's profit within entry allowance.,
\small monopolist's profit within entry deterrence.,\small monopolist's profit within entry deterrence when fine increases., \small $\hat\alpha'$ and $\hat\alpha_{max}'$ are the results of fine increasing.},
legend style={at={(0,-0.5)},anchor=north west,draw=none}, legend cell align=left]
\addlegendimage{dashdotted,sharp plot}
\addlegendimage{sharp plot}
\addlegendimage{dotted, sharp plot}
\addlegendimage{color=white}
\end{tikzlegend}
\end{tikzpicture}
\end{center}
\end{frame}
\end{document}