I have two nodes and would like to position a third node centered above them. In the example below, the vertical position of node Z is good. However, I would like to move node Z further to the right to be centered relative to the two nodes at the bottom. Is there an interpolation command similar to above=of x!0.5!y
or another simple way of doing this?
Example:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows.meta,fit,calc,backgrounds,shapes.geometric}
\begin{document}
\begin{tikzpicture}
\node[circle, draw=black] (x) {$x$};
\node[circle, draw=black, right=of x] (y) {$y$};
\node[circle, draw=black, above=of x] (z) {$z$};
\path (x) edge[->, sloped, anchor=south] node {left} (z);
\path (z) edge[->, sloped, anchor=south] node {right} (y);
\path (x) edge[->, sloped, anchor=north] node {bottom} (y);
\end{tikzpicture}
\end{document}
Output:
I'm aware of the related question tikz center node below 2 other nodes but the answers seem to suggest right above=x
which does not actually center the node between X and Y.