Graphics, Figures & Tablestikz does not write the numbers inside a filled circle

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
koleygr
Posts: 21
Joined: Fri Jul 01, 2011 11:18 pm

tikz does not write the numbers inside a filled circle

Post by koleygr »

Hi,

I am trying to make a figure and I need two circles with colors and numbers inside.

I am trying the following code

Code: Select all

    \begin{tikzpicture}
    \draw (0,0) circle (2.5cm);
    \draw[fill=blue!30] (3,0) circle (2cm);
    \draw [clip](0,0) circle (2.5cm);
    \fill[yellow] (0,0) circle (2.5cm);
    \fill[yellow!50!blue] (3,0) circle (2cm);
    \node at (2.,0) {$\color{red}\bm{0}$};
    \node at (2.,0.6) {$\mathit{\bm{19}}$};
    \node at (0.,0.4) {$\mathit{\bm{43}}$};
    \node at (0.,-0.4) {$\underline{\bm{68}}$};
    \node at (2.,-0.6) {$\underline{\bm{44}}$};
    \node[black] at (3.,0.4)  {$\mathit{\bm{24}}$};
    \node[black] at (3.,-0.4) {$\underline{\bm{29}}$};
    \end{tikzpicture}
but I can not get the last two numbers
Using Kile 2.1.0 under Ubuntu software.
\XeLaTeX: XeTeX 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

koleygr
Posts: 21
Joined: Fri Jul 01, 2011 11:18 pm

tikz does not write the numbers inside a filled circle

Post by koleygr »

I fixed that using:

Code: Select all

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
and

Code: Select all

\def\firstcircle{(0:1cm) circle (2.5cm)}
\def\secondcircle{(0:4.cm) circle (2.cm)}    
\begin{tikzpicture}
  \begin{scope}[ fill opacity=0.5]
    \fill[yellow] \firstcircle;
    \fill[blue!80] \secondcircle;
  \end{scope}
  \node at (3.,0) {$\color{red}\bm{0}$};
  \node at (3.,0.6) {$\mathit{\bm{19}}$};
  \node at (0.8,0.4) {$\mathit{\bm{43}}$};
  \node at (0.8,-0.4) {$\underline{\bm{68}}$};
  \node at (3.,-0.6) {$\underline{\bm{44}}$};
  \node at (4.5,0.4)  {$\mathit{\bm{24}}$};
  \node at (4.5,-0.4) {$\underline{\bm{29}}$};
\end{tikzpicture}
Using Kile 2.1.0 under Ubuntu software.
\XeLaTeX: XeTeX 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)
Post Reply