Graphics, Figures & TablesY-shape for tree diagram in Tikz

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
borgauf
Posts: 2
Joined: Sun May 10, 2020 6:30 am

Y-shape for tree diagram in Tikz

Post by borgauf »

I need some help getting started with a tree diagram. It should have a "Split" and a "Flat", both objects identical, and should be depicted like a capital Y, i.e., a vertical base, then two branches going off at roughly ninety degrees from each other. These will then be placed onto one another to form a tree, a base onto the ends of the branches -- or a final Flat terminated with piece of "Fruit" on the left branch and a "Bud" on the right. This is from The Little MLer BTW.

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

Y-shape for tree diagram in Tikz

Post by Bartman »

A picture is worth a thousand words. A photographed hand-drawn picture or uploading/linking an existing picture could help give you advice on how to approach the solution.
borgauf
Posts: 2
Joined: Sun May 10, 2020 6:30 am

Y-shape for tree diagram in Tikz

Post by borgauf »

fruittree1.png
fruittree1.png (5.87 KiB) Viewed 1770 times
Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Y-shape for tree diagram in Tikz

Post by Bartman »

The chapter 21 "Making Trees Grow" in the documentation should help you to expand my example.

Code: Select all

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

\begin{document}
\begin{tikzpicture}[
  font=\sffamily,
  grow'=up,
  % The default value of level distance and sibling distance is 1.5 cm.
  sibling distance=3cm
]
  \coordinate 
    child {
      child {
        child {
          child {
            child {
              child {node {Peach}}
              child {node {Bud}}
            }
          }
          child
        }
      }
      child {
        child {
          child[missing]
          child
        }
      }
    }
  ;
\end{tikzpicture}
\end{document}
Post Reply