[epic] allow (axis) coordinate access to each node/coordinate
Brought to you by:
cfeuersaenger,
ludewich
It would be great if there would be a simple interface to access the axis coordinate values of an arbitrary coordinate. To give an example I would like to be able to access x,y(,z) coordinate of e.g. a stored coordinate (A)
.
There are a lot of questions regarding this topic on TeX.SX. I'll try to collect them here:
- http://tex.stackexchange.com/a/38572/95441 (<-- shows an answer from Jake which could be a good starting point for an implementation)
- http://tex.stackexchange.com/questions/88386
- http://tex.stackexchange.com/questions/174205
- http://tex.stackexchange.com/questions/220284
- http://tex.stackexchange.com/questions/243578
- http://tex.stackexchange.com/questions/312117
I have extended an existing functionality which addresses this use-case: pgfplots already knew \pgfplotspointgetcoordinates which returned the "current" coordinate.
I extended it such that one can write
The returned coordinates are written into keys, i.e. they are accessible via
\pgfkeysvalueof{/data point/x} and \pgfkeysvalueof{/data point/y} .
This allows "basic level access" to the use-case. I do not know if we need a higher level approach which allows the TikZ point syntax.
I also added support for tikz-syntax of points like
\pgfplotspointgetcoordinates{(nodename)} or \pgfplotspointgetcoordinates{(4,5)}