3

I am trying to reproduce this diagram

enter image description here

So far I have tried

\documentclass[border=10pt]{standalone}

\usepackage{tikz}

\usetikzlibrary{positioning}

\begin{document}

\begin{tikzpicture}[%
    node distance=1.5cm,
    filled/.style={circle,fill=red,text=white,minimum size=2cm}
]
\node [filled,label=below:{Primary Optical Area}] (1) {1};
\node [right=2cm of 1,filled,label=below:{Strong Fallow Area}] (2) {2};
\node [below=2cm of 1,filled,label=below:{Weak Fallow Area}] (3) {3};
\node [right=2cm of 3,filled,label=below:{Terminal Area}] (4) {4};
\end{tikzpicture}

\end{document}

which results in

enter image description here

which is not quite what I want.

How do I make the coordinate system, so it is equivalent with the first picture?

Jamgreen
  • 3,687

1 Answers1

5

There are multiple options here. Positioning the lines becomes easier if you place all the nodes relative to (0,0), then you can just do as below.

enter image description here

\documentclass[border=10pt]{standalone}    
\usepackage{tikz}
\usetikzlibrary{positioning}    
\begin{document}

\begin{tikzpicture}[%
    node distance=1.4cm and 2.2cm,
    filled/.style={circle,fill=red,text=white,minimum size=2cm,font=\Huge},
    label distance=5pt
]
\coordinate (O) at (0,0);
\node [above left=of O,filled,label=below:{Primary Optical Area}] (1) {1};
\node [above right=of O,filled,label=below:{Strong Fallow Area}] (2) {2};
\node [below left=of O,filled,label=below:{Weak Fallow Area}] (3) {3};
\node [below right=of O,filled,label=below:{Terminal Area}] (4) {4};

\draw (0,4) -- (0,-4);
\draw (4,0) -- (-4,0);
\draw [dashed,-latex,red] (1) -- (2);
\draw [dashed,-latex,red] (2) -- (3);
\draw [dashed,-latex,red] (3) -- (4);
\end{tikzpicture}
\end{document}
Torbjørn T.
  • 206,688
  • Great! But what about increasing the font size of the number within the circles and adding a small distance between the label and the circle? – Jamgreen Jan 02 '17 at 08:36
  • 2
    @Jamgreen font=\Huge added to the filled style, and label distance=5pt (or some other length) added to the tikzpicture options, see edited code. – Torbjørn T. Jan 02 '17 at 08:43
  • 2
    Even though it is not needed, the fading is not too difficult to achieve:\fill[left color=white,right color=black] (-4.5,-.2pt) rectangle (0,.2pt); \fill[left color=black,right color=white] (0,-.2pt) rectangle (4.5,.2pt); \fill[top color=white,bottom color=black] (-.2pt,4.5) rectangle (.2pt,0); \fill[top color=black,bottom color=white] (-.2pt,0) rectangle (.2pt,-4.5); instead of the line drawings. – nox Jan 02 '17 at 08:59
  • 1
    @Jamgreen FYI, see nox' comment above. – Torbjørn T. Jan 02 '17 at 08:59