I would like to make in LaTeX these circles.
How can we add the words in them? The color for the big one?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityYou tagged tikz-pgf, so here goes.
The shadings
library is used to shade the ring similar to your image. The even odd rule
makes it possible to use another circle
to not-fill the inner part.
As both circular paths use different line option (one is blue-ish, the other is one black) we cannot use the same \path
(implicitly called by \shade
) but use two separate \draw
commands. For maintainability reasons the path is saved as an insert path
style so that one can use it again without repeating all values.
The decorations.text
library is used to place the text along arc
paths.
A node is placed on the outer circle by
\node[dot] at (30:2.5cm and 1.75cm) {};
Sadly, one cannot place a node on a circle
path. There does not even exist a timer. (I think, recent CVS version of PGF allow it to place nodes along an arc
.)
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.text,shadings}
\tikzset{
saveuse path/.code 2 args={
\pgfkeysalso{#1/.estyle={insert path={#2}}}%
\global\expandafter\let\csname pgfk@\pgfkeyscurrentpath/.@cmd\expandafter\endcsname % not optimal as it is now global through out the document
\csname pgfk@\pgfkeyscurrentpath/.@cmd\endcsname
\pgfkeysalso{#1}%
}
}
\begin{document}
\begin{tikzpicture}[even odd rule,dot/.style={shape=circle,fill=green,draw}]
\shade[top color=white, bottom color=blue!40] [saveuse path={big circle} {(0,0) circle [x radius=2.5cm, y radius=1.75cm]}]
[saveuse path={small circle}{(0,0) circle [x radius=1.5cm, y radius=1.0cm]}];
\draw [small circle];
\draw[blue!40] [big circle];
\node[dot] at (30:2.5cm and 1.75cm) {};
\path [
decoration={
name=text along path,
text={|\bfseries\sffamily|Productivity||},
reverse path,
text align={align=center},
},
decorate
] (60:2.0cm and 1.4cm) arc [x radius=2.0cm, y radius=1.0cm, start angle=60, end angle=120];
\path [
decoration={
name=text along path,
text={Efficiency},
text align={align=center},
},
decorate
] (-140:1.3cm and .8cm) arc [x radius=1.3cm, y radius=0.5cm, start angle=-140, end angle=-40];
\end{tikzpicture}
\end{document}
backgrounds
library and the gridded
option from the TikZ picture.
May 18, 2013 at 15:22
(<angle>:2.5cm and 1.75cm)
. You can place anything you want on it.
May 18, 2013 at 17:36
x radius
and y radius
option do not have anything to do with the node
and you’re missing at least the {}
of the node. I wouldn’t include the node in the saveuse path
either because it would be repeated for the \draw
part. Let me update the answer with some ideas.
May 18, 2013 at 19:43
\documentclass{...}
and ending with\end{document}
.