
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{fourier} % Utilisation des polices texte
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{0pt}%
\usetikzlibrary[positioning]
\usetikzlibrary{patterns}
\usepackage[french]{babel} % styles français
\newcommand{\daywidth}{8 em}
% Style for Days
\tikzset{day/.style = {draw,
minimum height = 1cm,
minimum width = \daywidth,
fill = yellow!20,
anchor = south west}}
% style for title
\tikzset{title/.style = {draw,
minimum height = 1 cm,
minimum width = 1.5 cm,
fill = black,
text = white}}
% Style for hour
\tikzset{hour/.style = {draw,
minimum height = 1 cm,
minimum width = 1.5 cm,
fill = yellow!30,
anchor = north east}}
% Styles for events
\tikzset{hours/.style = {draw, text centered,
minimum width = \daywidth,
anchor = north west,
text width = 7 em}}
\tikzset{1hour/.style ={hours, minimum height = 1cm}}
\tikzset{2hours/.style ={hours, minimum height = 2cm}}
\tikzset{3hours/.style ={hours, minimum height = 3cm}}
%Style for type of sequence
\tikzset{6B/.style ={1hour, fill = green!20}}
\tikzset{2A/.style ={1hour, fill = red!20}}
\tikzset{TESSP/.style ={1hour, fill = blue!20}}
\tikzset{TES/.style ={1hour, fill = blue!10}}
\tikzset{PESSP/.style ={1hour, fill = magenta!50}}
\tikzset{Empty/.style ={1hour, fill = lightgray!30}}
\begin{document}
\begin{tikzpicture}[x=\daywidth, y=-1cm, node distance=0 cm,outer sep = 0pt]
% Positioning labels for days and hours
\node[day] (lundi) at (1,8) {\textbf{Lundi}};
\node[day] (mardi) [right = of lundi] {\textbf{Mardi}};
\node[day] (mercredi) [right = of mardi] {\textbf{Mercredi}};
\node[day] (jeudi) [right = of mercredi] {\textbf{Jeudi}};
\node[day] (vendredi) [right = of jeudi] {\textbf{Vendredi}};
\node[hour] (8-9) at (1,8) {\textbf{8-9}};
\node[hour] (9-10) [below = of 8-9 ] {\textbf{9-10}};
\node[hour] (10-11) [below = of 9-10] {\textbf{10-11}};
\node[hour] (11-12) [below = of 10-11] {\textbf{11-12}};
\node[hour] (12-13) [below = of 11-12] {\textbf{12-13}};
\node[hour] (13-14) [below = of 12-13] {\textbf{13-14}};
\node[title,above = of 8-9] {2009};
% lundi 1
\node[6B,2hours] at (1,8) {6B \textcolor{red}{(S 01)}};
\node[Empty] at (1,10) {};
\node[Empty] at (1,11) {};
\node[Empty] at (1,12) {};
\node[Empty] at (1,13) {};
% mardi 2
\node[2A] at (2,8) {2A \textcolor{red}{(B 21)}};
\node[Empty] at (2,9) {};
\node[Empty] at (2,10) {};
\node[TES] at (2,11) {TES \textcolor{red}{(B 12)}};
\node[Empty] at (2,12) {};
\node[PESSP] at (2,13) {PESSP \textcolor{red}{(B 21)}};
% mercredi 3
\node[TES,2hours]at (3,8) {TES \textcolor{red}{(B 13)}};
\node[2A] at (3,10) {2A gr B \textcolor{red}{(CB)}};
\node[2A] at (3,11) {2A gr A \textcolor{red}{(CB)}};
\node[Empty] at (3,12) {};
\node[Empty] at (3,13) {};
% jeudi 4
\node[2A] at (4,8) {2A \textcolor{red}{(B 21)}};
\node[TESSP] at (4,9) {TESSP \textcolor{red}{(B 12)}};
\node[6B] at (4,10) { 6B \textcolor{red}{(S 21)}};
\node[PESSP] at (4,11) { PESSP \textcolor{red}{(B 12)}};
\node[Empty] at (4,12) {};
\node[Empty] at (4,13) {};
% vendredi 5
\node[6B] at (5,8) {6B \textcolor{red}{(S 21)}};
\node[Empty] at (5,9) {};
\node[TESSP] at (5,10) {TESSP \textcolor{red}{(S 01)}};
\node[TES] at (5,11) {TES \textcolor{red}{(S 01)}};
\node[2A] at (5,12) {2A \textcolor{red}{(S 38)}};
\node[Empty] at (5,13) {};
\end{tikzpicture}
\end{document}