What is the best way to place a label in the middle of a line with TikZ? I mean smack dab in the middle of the line, not above or below it. The following is close
\begin{tikzpicture}
\draw[|->, color=red] (-4cm, 0.5cm) -- (2.5cm, 0.5cm) node[midway, color=black] {$\tau_{r}$};
\end{tikzpicture}
But the line crosses right through the node and its text, which is bad.
I don't know if there is an option to choose the background color of a node, which I think would solve the problem (e.g. background=white). fill doesn't seem to work.

