ReportDiagrams
ENGR003-004
Requiredfields

Description

The code is a LaTeX document that creates a diagram using TikZ, a package for creating graphics in LaTeX. The diagram consists of three matrices, each with a different color scheme and containing text boxes that are labeled with icons and text. The first matrix is labeled "Personal Info" and contains three text boxes labeled "Name, Address," "Date Of Birth," and "Zip Code." The second matrix is labeled "Financial Info" and contains three text boxes labeled "Credit Score," "Income," and "SIN Number." The third matrix is labeled "Property Info" and contains three text boxes labeled "Mortgage Amount," "Purchase Amount," and "Other Properties." The matrices are positioned side-by-side using the "right" and "anchor" commands, and the fonts used in the text boxes are sans-serif. The code also defines various color schemes and styles for the matrices and text boxes.

Keywords

Latex, TikZ, matrix, positioning, nodes, styles, color, fill, line width, rounded corners, minimum height, align, text, font, text width, label, fontawesome, anchor.

Source Code

ReportDiagrams/ENGR003-004

\documentclass[border=5pt]{standalone}
\usepackage{fontawesome}
\usepackage{tikz}
\usetikzlibrary{matrix, positioning}
 
\definecolor{bluei}{RGB}{83,116,191}
\definecolor{blueii}{RGB}{207,212,232}
\definecolor{greeni}{RGB}{135,200,81}
\definecolor{greenii}{RGB}{216,235,207}
\definecolor{redi}{RGB}{196,125,82}
\definecolor{redii}{RGB}{234,214,207}
 
\tikzset{
  myiblock/.style 2 args={
    draw=white,
    fill=#1,
    line width=1pt,
    rounded corners,
    minimum height=1cm,
    align=center,
    text=white,
    font=\sffamily,
    text width=#2
  },
  myoblock/.style={
     matrix of nodes,
    fill=#1,
    rounded corners,
    align=center,
    inner xsep=10pt,
    draw=none,
    row sep=0.5cm
  },
  mylabel/.style={
    black, 
    minimum height=0pt
    }
}
 
\begin{document}
 
\begin{tikzpicture}
\matrix (A) [myoblock={blueii}, nodes={myiblock={bluei}{3cm}}, row sep=3pt]
  {|[label={[mylabel]\faUserSecret \ Personal Info}]|{ Name, Address }\\ 
  Date Of Birth \\
  Zip Code\\
  };
 
\matrix (B) [myoblock={greenii}, nodes={myiblock={greeni}{3cm}}, 
   row sep=3pt, right=5mm of A.north east, anchor=north west]
  {|[label={[mylabel] \faBank \ Financial Info}]| Credit Score \\
   Income \\ 
   SIN Number\\
  };
  
\matrix (C) [myoblock={redii}, nodes={myiblock={redi}{3cm}}, 
   row sep=3pt, right=5mm of B.north east, anchor=north west]
  {|[label={[mylabel] \faHome \ Property Info}]| Mortgage Amount \\
   Purchase Amount \\ 
   Other Properties \\
  };
\end{tikzpicture}
 
\end{document}
Deploy to Overleaf