Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How can I force TikZ pin angle?
TikZ node pin angle in 2D plot

I need to have some marks in a diagram pointing at characteristic points of the plot. To not have the text printed over the plot line I needed to adjust the angles of the pins.

The angles however don't seem to work the way they should. See the following example:

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ymax=2]
\addplot+[domain=-360:360] {sin(x)};
\node[coordinate,pin=93:{93 degrees}]
    at (axis cs:-270,1) {};
\node[coordinate,pin=94:{94 degrees?}]
    at (axis cs:90,1) {};
\end{axis}
\end{tikzpicture}
\end{document}

The first pin with an angle of 93 degrees looks correct, but the second one does clearly not follow the 94 degrees. An equal behaviour occurs by the way with 87 degrees being correctly set and 86 degrees fails to do so.

Why is that so? A bug in pgfplots? How can I overcome this? Is there another way to specify pins that have the angle they should have?

share|improve this question

marked as duplicate by percusse, Claudio Fiandrino, Werner, Kurt, Jake Nov 30 '12 at 19:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
not quite @percusse. But in your link I found a referrence to TikZ node pin angle in 2D plot Jakes answer there is exactly what I need. –  Huugo Nov 30 '12 at 19:41
    
I hope you also see that pin snapping is the reason why I voted for a duplicate :) Anyways, glad that it's solved. –  percusse Nov 30 '12 at 19:44

Browse other questions tagged or ask your own question.