I am interested in the line-to operation |- (or -| ) with rounded corner. Now, I would like to add a node on the rounded corner. But the node then appears not on the rounded corner -- it is rather on the `original corner'. How to force this node to be on the line?
Here is an MWE
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw (0,0)|-node{mid}(2,3);
\end{tikzpicture}
\begin{tikzpicture}
\draw [rounded corners=1cm] (0,0)|-node{mid}(2,3);
\end{tikzpicture}
\end{document}
This gives the output
I know it can be done with to
and also with controls
(though I couldn't get the desired result without a bit of tweaking)
I feel tweaking is not the right thing to do. It is like doing paint in tikz; if we are doing tweaking, why not draw on a WYSIWYG drawing software or geometry software and export?
So, my question is
Is there any way to put a node exactly on a rounded corner?
(preferably without using to
or controls
; but if you can do them in a rather neat way, you are more than welcome)
Oh, I almost forgot. Just being curious, is there a name for this |- or -| operation?
Thank you
controls
gives a nice output if we declare a coordinate beforehand.\path (0,0) |-\coordinate(midpt) (2,3); \draw (0,0) ..controls (midpt).. node{mid} (2,3);
gives satisfactory output in most cases.