TransWikia.com

How to draw a simple hierarchical relationships in LaTex (additional question)

TeX - LaTeX Asked on May 6, 2021

This is a follow up a question from enter link description here

enter image description here

 documentclass{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
    draw,
    semithick,
    rounded corners,
    text width=6em,
    text badly centered,
    minimum height=4ex,
    edge={
            draw=blue},
    anchor= north,
    grow=south,
    forked edge,
    s sep=4mm,
    l sep=12mm,
    fork sep=6mm,
}
[sample number 1[pure fruit][non pure fruit[water abc][sugar contaminated]]]
end{forest}
end{document}

How can i add in this new part:

enter image description here

One Answer

enter image description here

documentclass{standalone}
usepackage[edges]{forest}
begin{document}
begin{forest}
for tree={
    draw,
    semithick,
    rounded corners,
    text width=6em,
    text badly centered,
    minimum height=6ex,
    edge={draw=blue},
    anchor= north,
    grow=south,
    forked edge,
    s sep=4mm,
    l sep=5mm,
    fork sep=3mm,
    inner sep=1pt
}
[sample number 1[pure fruit[water abc][sugar contaminated]][non pure fruit[water abc][sugar contaminated]]]
end{forest}
end{document}

Correct answer by js bibra on May 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP