Example: A calendar of circles

Published 2012-01-04 | Author: Stefan Kottwitz
Authors: Till Tantau, Stefan Kottwitz
A calendar example from the PGF manual, calendar library documentation. Modifications are
  • changes in font family and size commands
  • shaded background circle
  • shaded month circles
  • font sizes and distances.

Download as: [PDF] [TEX]  •  [Open in Overleaf]

A calendar of circles

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% A calendar of circles
% Author: Till Tantau (The PGF manual),
%   and Stefan Kottwitz (Modifications such as shaded circles and color)
% A counter, since TikZ is not clever enough (yet) to handle
% arbitrary angle systems.
\begin{tikzpicture}[transform shape,
  every day/.style={anchor=mid,font=\tiny}]
  \node[circle,shading=radial,outer color=blue!30,inner color=white,
    minimum width=15cm] {\textcolor{blue!80!black}{\Huge\the\year}};
  \foreach \month/\monthcolor in
    7/summer,8/summer,9/fall,10/fall,11/fall,12/winter} {
      % Computer angle:
      \advance\mycount by -1
      \multiply\mycount by 30
      \advance\mycount by -90
      \shadedraw[shading=radial,outer color=\monthcolor!30,middle color=white,
        inner color=white,draw=none] (\the\mycount:5.4cm) circle(1.4cm);
      % The actual calendar
      \calendar at (\the\mycount:5.4cm) [
          dates=\the\year-\month-01 to \the\year-\month-last]
      if (day of month=1) {\large\color{\monthcolor!50!black}\tikzmonthcode}
      if (Sunday) [red]
      if (all) {
      % Again, compute angle
      \advance\mycount by -\pgfcalendarcurrentday
      \multiply\mycount by 11
      \advance\mycount by 90


Adding comments is currently not enabled.