Menu

#68 [epic] allow (axis) coordinate access to each node/coordinate

Next Release
closed
epic (1)
9
2017-11-04
2017-02-25
No

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

Discussion

  • Christian Feuersänger

    • status: open --> pending
    • Group: unassigned --> Next Release
     
  • Christian Feuersänger

    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

    • \pgfplotspointgetcoordinates (no curly braces) in order to return the "current" coordinate as it used to do
    • \pgfplotspointgetcoordinates{\pgfpoint{100pt}{200pt}} if you have low-level canvas coordinates positioned at 100pt,200pt
    • \pgfplotspointgetcoordinates{\pgfpointanchor{labeledcoord}{center}} in order to get coordinates of a named coordinate.
    • the optional argument can be any PGF basic level command which returns point coordinates.

    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.

     
  • Christian Feuersänger

    I also added support for tikz-syntax of points like

    \pgfplotspointgetcoordinates{(nodename)} or \pgfplotspointgetcoordinates{(4,5)}

     
  • Christian Feuersänger

    • status: pending --> closed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.