Skip to content

Instantly share code, notes, and snippets.

@paradx
Created June 7, 2017 08:08
Show Gist options
  • Save paradx/28b0dc7601b8efd00a3d178e81432351 to your computer and use it in GitHub Desktop.
Save paradx/28b0dc7601b8efd00a3d178e81432351 to your computer and use it in GitHub Desktop.
Riskmanagement Matrix to plot risks in a grid of consequences of occurence
\usepackage{tikz} %the package that allows all the magic
%document start etc...
\begin{figure}[h]
\begin{tikzpicture}
[every node/.style=
{minimum width=3.95 cm, %each field is about 4 cm wide
minimum height= 1.95cm, %each field is about 2 cm high
outer sep=0pt},
cross/.style %style the grid
{draw,
cross out,
minimum size=2*(#1-1pt), inner sep=0pt, outer sep=0pt}, x=2 cm, y=1 cm]
% draw grid
\draw [color=black] [step=2] (0,0) grid (10,10);
% Color the fields and add text (the text is in german "niedrig" = "low"; "mittel" = "medium"; "hoch" = "high"; "sehr hoch" = "very high")
\node[fill=green!75!black] at (1,1) {niedrig};
\node[fill=green!75!black] at (3,1) {niedrig};
\node[fill=green!75!black] at (5,1) {niedrig};
\node[fill=green!75!black] at (7,1) {niedrig};
\node[fill=green!75!black] at (9,1) {niedrig};
\node[fill=green!75!black] at (1,3) {niedrig};
\node[fill=green!75!black] at (3,3) {niedrig};
\node[fill=yellow] at (5,3) {mittel};
\node[fill=yellow] at (7,3) {mittel};
\node[fill=yellow] at (9,3) {mittel};
\node[fill=yellow] at (1,5) {mittel};
\node[fill=yellow] at (3,5) {mittel};
\node[fill=orange] at (5,5) {hoch};
\node[fill=orange] at (7,5) {hoch};
\node[fill=orange] at (9,5) {hoch};
\node[fill=yellow] at (1,7) {hoch};
\node[fill=orange] at (3,7) {hoch};
\node[fill=red!70!black] at (5,7) {sehr hoch};
\node[fill=red!70!black] at (7,7) {sehr hoch};
\node[fill=red!70!black] at (9,7) {sehr hoch};
\node[fill=yellow] at (1,9) {mittel};
\node[fill=orange] at (3,9) {hoch};
\node[fill=red!70!black] at (5,9) {sehr hoch};
\node[fill=red!70!black] at (7,9) {sehr hoch};
\node[fill=red!70!black] at (9,9) {sehr hoch};
% insert dots for each risk; 01/02 etc are the risk numbers can be subst. for anything else
\foreach \Point/\Risk in
{(2.5,9.5)/{01},
(1.5,5.5)/{02},
(6.5,6.5)/{03},
(2.5,7.5)/{04},
(2.5,3.5)/{05}}
\draw[fill=white]\Point circle (3.5pt) node[above left, style={minimum width = 0,minimum height = 0} ] {$\Risk$};
% draw axis
\draw[->,thick] (0,0) -- (10.3,0) node[style={minimum width = 0,minimum height = 0}, below] {$Wahrscheinlichkeit$}; % likelyhood
\draw[->,thick] (0,0) -- (0,10.3) node[style={minimum width = 0,minimum height = 0}, above] {$Auswirkung$}; % consequences
\end{tikzpicture}
\end{figure}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment