# tikz how to center text in a vertical rectangle

I am trying to put vertically rotated text inside a rectangle and I have not been able to get it centred vertically. Here is my minimal code and what I get. Any help would be appreciated.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}

\begin{document}
\begin{tikzpicture}

\coordinate (dm1) at (0,3);
\coordinate (dm2) at (0,-3);
\node[rectangle,draw,minimum width=2cm,align=center] [fit = (dm1) (dm2)] (bx4) {\rotatebox{90}{\large Storage Advisor}};

\end{tikzpicture}
\end{document}]


1

• Use rotate=90 on the node instead of rotatebox – percusse Aug 21 '14 at 20:29
• Unfortunately that doesn't work. That rotates the entire rectangle which I don't want (it is already a vertical rectangle) -- all I want is to rotate the text, which happens, but I also want it centred, which is not happening. – ozsu Aug 21 '14 at 22:22

Draw the node separately again.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fit}

\begin{document}
\begin{tikzpicture}

\coordinate (dm1) at (0,3);
\coordinate (dm2) at (0,-3);
\node[rectangle,draw,minimum width=2cm] [fit = (dm1) (dm2)] (bx4) {};