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,
circle,scale=0.2}}
\node[small dot, pin=120:{$100\ k\Omega$}] at (axis description cs:0.5,0.61) {};
Best Answer
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 thetext opacity
needs to be set separately, sincefill opacity
applies both to the background colour and the text.