[Tex/LaTex] Change pin node style in pgfplots

pgfplots

With pgfplot, how can I change the style of a "pin node" to have a thicker line?

I saw posts here how to change the "text label" part of the pin node.. but not this little line beneath it.

Best Answer

You can use \tikzset{every pin edge/.style={draw=red, ultra thick}}, or as @Jake pointed out, you can specify the options for the pin edge as:

\node [coordinate, pin={[pin edge={red, ultra thick}]foobar}] at (0,0) {};

enter image description here

Code: \tikzset{every pin edge/.style={}

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
  \tikzset{every pin edge/.style={draw=red, ultra thick}}

  \node [coordinate, pin={[ultra thick, draw=blue, fill=yellow]foobar}] at (0,0) {};
\end{tikzpicture}
\end{document}

Code: pin edge option within pin=

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
  \node [coordinate, pin={[ultra thick, draw=blue, fill=yellow,pin edge={red, ultra thick}]foobar}] at (0,0) {};
\end{tikzpicture}
\end{document}