I browsed through the manual, mailing lists and the web, but could not find an answer, so I post my question here.
Is there an easy way with TikZ or PGF to get either the x or the y-coordinate from a named node?
I'd like to achieve this:
I have a set of named nodes, and I want to create a new node that is 1. centered horizontally (= the new node's x-coordinate is halfway between the leftmost and the rightmost nodes' x-coordinate), and 2. just above the highest source node (= the new node's y-coordinate is the maximum of all other nodes plus some fixed offset). So I need to do computations with these nodes' coordinates, but separately and differently for the x- and y-coordinate.
How could I do such a thing, without digging too deep into the core functionality of PGF?
and similarly for y. However *much* easier (assuming I understand what you want) is to cheat and use the fit library to create a node around the required nodes and then reference that node for the label: