7
\documentclass[border=100pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
 \node[circle, shading=ball, drop shadow, ball color=red!10!black, minimum width=4cm, color=white,  opacity=.5, label={[blue]left:A}] (ball1) at (0,0) {BALL 1};

 \node[circle, shading=ball, drop shadow, ball color=red!20!black, minimum width=4cm, color=white, opacity=.5, label={[red]right:B}, xshift=5cm] (ball2) at (2,0) {BALL 2};

\end{tikzpicture}
 \end{document}

enter image description here

2
  • Can you explain more precisely what you want to do ? – Jérôme Dequeker Jun 29 '16 at 6:18
  • 3
    I think you are looking for pin. – Claudio Fiandrino Jun 29 '16 at 6:59
10

You can use as much labels as you need: just declare several label options. But if you want to join label and node with a line/arrow, use pin.

\documentclass[border=100pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows}

\begin{document}
\begin{tikzpicture}
\node[circle, shading=ball, drop shadow, ball color=red!20!black, 
      minimum width=4cm, color=white, opacity=.5, 
      label={[red]right:B}, 
      label={[blue]135:A},
      pin={45:C}, 
      pin={[pin distance=1cm, pin edge={<-, shorten <= 1pt, red}]below:D}] 
  (ball2) {BALL 2};

\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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