7

I'd like to recreate the 'Adjacency Diagram' found on the AIA Website:

Adjacency Diagram

Made attempts to force genyoungtabtikz and stackengine with rotation to do it but I'm getting nowhere.

Related: Any package for matrix diagram? (uses stackengine)

Here's what I managed with genyoungtabtikz. Unfortunately the docs state that the rotated ("Russian form") version of the macro won't work properly inside a tikzpicture environment by design.

\documentclass[]{article}
\usepackage{genyoungtabtikz}

\begin{document}
 \YRussian  
 \gyoung(1234,:\ 234,:\ :\ 34,:\ :\ :\ 4) 
\end{document}

1 Answers1

14

a possible solution we first create a table node that we number Then, it sends a change of coordinate system by a rotation of 45 ° to easily trace the grid. All intersections of the grid are named, then just draw the connections in the right places

enter image description here

\documentclass{article}

\usepackage[latin1]{inputenc}              
\usepackage[T1]{fontenc}     

\usepackage{tikz}

\usetikzlibrary{positioning,calc}

\definecolor{myblue}{rgb}{0.407,0.792,0.949}

\begin{document}

\begin{tikzpicture}
\def\hh{1.2em}
\foreach \nn [count=\ni] in {Vice President,Director,
    deputy director,environmental planning, center for development,
    office of research \& development,
    resource center,
    public information,
    community relations,
    administrative services,
    office of new programs,
    personnel,
    public
    }{
\node[text width=22em,draw=myblue,,minimum height=\hh,inner sep=0](n\ni) at (0,{-\ni*\hh}){\, \textsc{\nn}};
}

\begin{scope}[rotate=45]
\foreach \ii in {1,2,...,13}{
\draw[myblue] (n1.north east)|-(n\ii.south east);
\draw[myblue] (n\ii.north east)|-(n13.south east);
\foreach \jj in{\ii,...,13}{
\path (n\jj.east) -| node[circle](n\ii-\jj){} (n\ii.east);
}
}

\draw[fill=black] (n1-2) circle (0.2em);
\draw[fill=black] (n2-8) circle (0.2em);
\draw[fill=black] (n3-8) circle (0.2em);
\draw[fill=black] (n6-10) circle (0.2em);
\draw[fill=black] (n7-12) circle (0.2em);
\draw[fill=black] (n7-13) circle (0.2em);

\draw[fill=white] (n2-3) circle (0.2em);
\draw[fill=white] (n2-9) circle (0.2em);
\draw[fill=white] (n3-4) circle (0.2em);
\draw[fill=white] (n3-5) circle (0.2em);
\draw[fill=white] (n3-6) circle (0.2em);
\draw[fill=white] (n3-7) circle (0.2em);
\draw[fill=white] (n5-6) circle (0.2em);
\draw[fill=white] (n5-11) circle (0.2em);

\end{scope}

\end{tikzpicture}

\end{document}
Rmano
  • 40,848
  • 3
  • 64
  • 125
rpapa
  • 12,350