! LaTeX Error: Not in outer par mode.
I seek a solution to be able to make this figure inside leftbar environment work:
\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{framed}
\begin{document}
\begin{leftbar}
\begin{figure}[h!]
\caption{Mean data points enclosed by shapes are contained within the same group, within 95\% confidence.}
\includegraphics[scale=0.7]{"../Data Analysis Files/InteractionPlotforTransLog10(X+1)Count"}
\end{figure}
\end{leftbar}
\end{document}
@Stefan Kottwitz, your solution is otherwise perfect, but it does introduce this problem of cropping at the end of pages:

figureenvironment is a float, which seems inappropriate in a side bar. – Joseph Wright♦ Jun 5 '11 at 17:54