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

I have this shaded circle:

\shade [ball color=black!80!white] (0,0) circle (1);

Is it possible to encapsulate it with node style and fixing the circle radius?

share|improve this question

You could define a style for nodes using \tikzstyle:

\tikzstyle{ball} = [circle,shading=ball, ball color=black!80!white,
    minimum size=1cm]
\node [style=ball] {};


alt text

share|improve this answer
thanks!. Why can't I have "maximum size" as well? – Łukasz Lew Aug 17 '10 at 17:15
I think TikZ doesn't support a maximum size for nodes. – Stefan Kottwitz Aug 17 '10 at 17:17
You can specify text width, text height, text depth and inner sep explicitly. This will define the maximum node size. I don't think it's a good idea, though. – Martin Heller Aug 17 '10 at 17:38
So how should I ensure that text will be scaled down to fit into node (instead of node scaled up) ? – Łukasz Lew Aug 17 '10 at 18:32
For instance with \resizebox of the graphicx package if needed. – Stefan Kottwitz Aug 17 '10 at 18:47

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.