8

If using ball shading on non-circle elements, it will well apply the shading effect, but it will use the default blue color. How to use ball shading with the element color.

\node[text width=3cm,fill=red,shading=ball] (test) at (1,1) {Text};

This will produce a rectangle with ball shading effect; however, in blue color instead of red.

8

Just add the ball color option:

\node[text width=3cm, shading=ball, ball color=red] (test) at (1,1) {Text};

More details in the PGF/TikZ manual (v 2.10) - page 413, under /tikz/ball color, where you can find links to other sections with other useful options too.

  • 1
    Thanks, I check TikZ manual everyday for my issues; but it is not easy to find something in 800 pages ;) – Googlebot Jun 3 '12 at 12:15

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.