I have a series of five image generated from a code that I wish to include one under the other in a figure. I would like to include labels on the left, right and bottom of each of them (left and bottom are identical to each of them).
However I would like the side labels to be rotated by 90°, but it seems that by default the point of rotation is the bottom right of the label on the left and bottom left for the one on the right. I cannot figure out how to rotate the label from its centre.
\PassOptionsToPackage{demo}{graphicx}
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\node[draw,
label={[rotate=90]west:years $\rightarrow$},
label={south:some other text},
label={[rotate=-90,text=gray]east:OtherLabel}]
{\includegraphics[width=12cm,height=2.4cm]{somefile1}};
\node[draw, yshift=2.5cm,
label={[rotate=90]west:years $\rightarrow$},
label={south:some other text},
label={[rotate=-90,text=gray]east:OtherLabel}]
{\includegraphics[width=12cm,height=2.4cm]{somefile2}};
\end{tikzpicture}
\end{document}
Best Answer
In
PGF 2.10
manual, at page 195, about the placement oflabels
in nodes, it can be read:However no example is provided about how to do that, and the obvious option:
produces no effect.
So I would use instead extra nodes to label the main ones: