Graphics, Figures & TablesDrawing Relationships between "nodes"

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
David_Leng
Posts: 3
Joined: Wed Jul 08, 2020 11:56 pm

Drawing Relationships between "nodes"

Post by David_Leng »

Hi, I'm trying to draw the picture using tikz.

I've used this code elsewhere, but I can't figure out how to make the final step. I'm probably using the wrong type of construct?

Any help gratefully received.

Thanks

David

-----------------------------

\documentclass[tikz, border=1cm]{standalone}
\tikzstyle{bag} = [align=left]

\begin{document}
\tikz [font=\small,
grow=left, level 1/.style={sibling distance=12em},
level 2/.style={sibling distance=3em}, level distance=5cm, edge from parent/.style={draw, <-,}]
\tikzstyle{bag} = [align=left]
\node[bag] {Fusion Level 2: Quantitative \\ Digraph Diagnosis} % Root
child { node[bag] {Fusion Level 1: Qualitative \\ Digraph
Diagnosis} edge from parent
child { node[bag] {Process Topology: \\ Signals + Streams} edge from parent[solid]}
child { node[bag] {Structural Models:\\Plant Devices} edge from parent[solid]}
child { node[bag] {Structural Models:\\Control Devices} edge from parent[solid]}
}
child { node[bag] {Historical} edge from parent
}
child { node[bag] {Monte Carlo} edge from parent
};
\end{document}
Attachments
Snippet.png
Snippet.png (64.36 KiB) Viewed 3164 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Drawing Relationships between "nodes"

Post by Bartman »

Please use the BBCode to highlight your code.

\tikstyle is outdated, use \tikzset instead.

I am not sure what your drawing should look like, but I still want to offer this suggestion:

Code: Select all

\documentclass[tikz, border=5pt]{standalone}

\usetikzlibrary{arrows.meta}

\begin{document}
\begin{tikzpicture}[
    >=Latex,
    font=\sffamily\small,% my choice
%    font=\itshape\small,% the setting as in the attached figure
    grow'=right,
%    parent anchor=east, 
    child anchor=west,
    level 1/.style={sibling distance=3cm},
    level distance=6cm,
    edge from parent/.style={draw, ->},
    nodes={align=left}
]
\node (root) {First Principles}
    child { node {Process Topology\\Signals + Streams}  
        edge from parent [draw=none] 
    } 
    child { node {Structural Models:\\Plant Devices} 
        child { node {Fusion Level 1: Qualitative\\Digraph Diagnosis} }
    }
    child { node {Structural Models:\\Plant Devices} 
        child {  
            edge from parent [draw=none] 
            child { node {Fusion Level 2: Quantitative\\Digraph Diagnosis} 
                edge from parent [draw=none] 
            }
        }
    }
    child { node {Monte Carlo:\\Probabilistic Data} }
;
\node [anchor=north east] 
    at (root-4.south-|root-2-1.east) (ph) {Plant History\\Probabilistic Data}
;
\path [->] 
    (root-1.east) edge (root-2-1.north west)
    (root-3.east) edge (root-2-1.south west)
    (root-2-1) edge (root-3-1-1)
    (root-4) edge (root-3-1-1.west)
    (ph) edge (root-3-1-1)
;
\end{tikzpicture}
\end{document}
David_Leng
Posts: 3
Joined: Wed Jul 08, 2020 11:56 pm

Drawing Relationships between "nodes"

Post by David_Leng »

Thanks Bartman. However, I'm getting an error - see attached. Any ideas? Also, how do I turn the font to Times New Roman
Attachments
2020-07-09.png
2020-07-09.png (193.39 KiB) Viewed 3133 times
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Drawing Relationships between "nodes"

Post by Bartman »

It would be better, if you create a Infominimal working example that reproduces the error. I don't get an error message from overleaf with my example.

The question about the font fits into a new topic.
David_Leng
Posts: 3
Joined: Wed Jul 08, 2020 11:56 pm

Drawing Relationships between "nodes"

Post by David_Leng »

Hi Bartman, I got rid of the errors (to with preamble conflicts) and worked out fonts. Thanks, David
Post Reply