TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to place a shadow/fill/opaque setting on text of a node pin? I know I can do that with the actual node, but I am using \node in pgfplots to mark some stuff on graphs, and it would be great if I could make a white filling in the text area to make it more clear. Of course, if you know a better way to achieve the same thing in pgf, let me know.

Code I've got so far is below. I tried putting something like [opaque=0.5] after pin, but it seems it has no such options, and I wasn't able to find anything relevant to pin text in pgf documentation.

\tikzset{small dot/.style={fill=black,

\node[small dot, pin=120:{$100\ k\Omega$}] at (axis description cs:0.5,0.61) {};
share|improve this question
Did you try opacity=0.5? – Peter Grill Jan 11 '12 at 0:08
up vote 12 down vote accepted

To get a semi-transparent background for your pin (or any other node, for that matter), you first need to specify some fill colour. So to get a semi-opaque node background, you could set fill=white, fill opacity=0.5, text opacity=1. Note that the text opacity needs to be set separately, since fill opacity applies both to the background colour and the text.


    grid=both, minor tick num=3, grid style=gray % Darker grid than normal to show the effect better
\node[pin={[fill=white, fill opacity=0.5, text opacity=1]120:$100\ k\Omega$}] at (axis description cs:0.5,0.6) {};
share|improve this answer

I have been using \tikzset{every pin/.style={draw=black,fill=yellow!10}} which yields:

enter image description here




\tikzset{small dot/.style={fill=black, circle,scale=0.2}}
\tikzset{every pin/.style={draw=black,fill=yellow!10}}

\node[small dot, pin=120:{$100\ k\omega$}] at (axis description cs:0.5,0.61) {};
share|improve this answer
This is a really great idea. – henry Jun 7 '14 at 11:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.