[pos] add key that allows to snap to nearest (given) coordinate also when...
Brought to you by:
cfeuersaenger,
ludewich
I am requesting two features here:
pos
also for \addplots
showing lines\coordindex
" to place a node on that position.Here is a third one from the PGFPlotsToDo list (which I moved here. I guess, also this request was from me ;)).
pos={x=40}
.And here another point from PGFPlotsToDo which is related (and I moved here).
modify the node[at=<pos>]
feature such that
node[at value=42.4]
or at max value
or at min value
or
node[at coordindex=3]
\documentclass[border=5pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ domain=0:360, ] \addplot {sin(x)} [yshift=8pt] % provide a key that allows to have the same positions as % given for the next `\addplot'; % e.g. that imitates the "snap to nearest" feature for plots % with `only marks' active. % % In addition it would be nice to state just the coordinate % index to put a node to that one % (e.g. it could be named `pos index' or something like that) node [pos=0.0] {$a$} node [pos=0.2] {$b$} node [pos=0.4] {$c$} node [pos=0.6] {$d$} node [pos=0.8] {$e$} ; \addplot+ [only marks] {sin(x)} [yshift=8pt] node [pos=0.0] {$a$} node [pos=0.2] {$b$} node [pos=0.4] {$c$} node [pos=0.6] {$d$} node [pos=0.8] {$e$} ; \end{axis} \end{tikzpicture} \end{document}
And this should be fixed as well when implementing this feature (moved here from PGFPlotsToDo):
Das pos=
feature funktioniert nur ungenau für smooth
. Implementiere es genauer.