LaTeX forum ⇒ Graphics, Figures & Tablesradius of coloured circle with text inside Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

radius of coloured circle with text inside

Postby paulosousa » Sat Jan 03, 2015 4:49 pm

Hello,

I am trying this code
  1. \tikz \node[circle,radius=0.5cm,color=white, fill=blue]{text};

to get a blue circle wit text inside.
But the option radius is not working... Could anyone please help me?

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9419
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Jan 04, 2015 12:20 pm

A radius option doesn't work for a node. It works with a normal circle shape:

  1. \begin{tikzpicture}
  2. \draw[fill=blue] (0,0) circle [radius=0.5cm];
  3. \node[color=white] {text};
  4. \end{tikzpicture}


If you would really like to use a node, you can set inner sep to 0 and a minimum size, such as

  1. \begin{tikzpicture}
  2. \node[circle, inner sep=0pt, minimum size=1cm, color=white, fill=blue]{text};
  3. \end{tikzpicture}



Stefan
Site admin

paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Postby paulosousa » Sun Jan 04, 2015 4:55 pm

Thanks a lot Stefan

Yesterday I tried

  1. \tikz \node[circle,scale=0.75,color=white, fill=blue]{text};


and worked fine!


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 2 guests