I am using the solutions of
Using a pgfplots-style legend in a plain-old tikzpicture
and
to create a legend in a tikzpicture.
In this legend I need a cylinder as image. I know that a node can be shaped as a cylinder. But I don't now how I can use this to create a legend image.
\begin{tikzpicture}
% node shaped as cylinder
\node[shape=cylinder](c) at (0,0){};
% cylinder drawn myself
\draw(3,3)--(4,3);
\draw(3,4)--(4,4);
\draw(3,2.5) ellipse (0.1 and 0.5);
\draw(4,2.5) ellipse (0.1 and 0.5);
\begin{customlegend}[legend cell align=left,
legend entries={ cylinder},
legend style={at={(6,3)},font=\footnotesize}]
\addlegendimage{ ??????? }
\end{customlegend}
\end{tikzpicture}

\documentclass), especially in a case like this where quite a bit of special code and certain packages are required. Otherwise, those trying to help have to do the work of figuring out how to compile the example. – Jake Jul 08 '12 at 14:58