2

I almost finished my diagram with help of peoples from this Stack Exchange network community. Please look at the figure which I attached here. I make two small circles. Is it possible to make these line in same alignment?

Codes are given below.

\documentclass{article}
\usepackage{tikz}
\usepackage{lscape}
\usepackage[edges]{forest}

\begin{document}
    \begin{forest}
        for tree={forked edge, edge=->, draw,
            thick,
            rounded corners, minimum size=8mm, l sep=10mm,align=left,fork sep=5mm,fill=blue!10}
        [Fluids, s sep=0.3cm
        [Ideal Fluids]
        [Real Fluids, s sep=0.3cm, 
        [Non-Newtonian Fluid, s sep=0.3cm
        [Time-Independent Fluids, s sep=0.3cm
        [Pseudo plastic][Dilatant][Bingham plastic]
        ]
        [Visco-elastic Fluids]
        [Time-Dependent Fluids, s sep=0.3cm
        [Thixotropic][Rheopetic]
        ]
        ]
        [Newtonian Fluids]
        ]
        ]
    \end{forest}
    \end{document}

enter image description here

1 Answer 1

5

Thanks to -- Forest tree with folders on every last relative level

enter image description here

\documentclass{article}
\usepackage{tikz}
\usepackage{lscape}
\usepackage[edges]{forest}
\forestset{
    calign to midchild or edge midpoint/.style={
        if={isodd(n_children())}{
            calign=child edge,
            calign primary child/.process={
                O+nw+n{n children}{(##1+1)/2}
            },
        }{
            calign=edge midpoint,
        },
    },
}

\begin{document}
    \begin{forest}
        my fork/.style={
%           grow=south, 
            calign to midchild or edge midpoint,
        },  
        for tree={forked edge, edge=->, draw,
            thick,
            rounded corners, 
            minimum size=8mm, 
            l sep=10mm,
            align=left,
            fork sep=5mm,
            fill=blue!10, my fork
            }
        [Fluids, s sep=0.3cm
        [Ideal Fluids]
        [Real Fluids, s sep=0.3cm, 
        [Non-Newtonian Fluid, s sep=0.3cm
        [Time-Independent Fluids, s sep=0.3cm
        [Pseudo plastic][Dilatant][Bingham plastic]
        ]
        [Visco-elastic Fluids]
        [Time-Dependent Fluids, s sep=0.3cm
        [Thixotropic][Rheopetic]
        ]
        ]
        [Newtonian Fluids]
        ]
        ]
    \end{forest}
\end{document}
2
  • 1
    Thanks for your help
    – SandyM
    Jan 12 at 10:27
  • 1
    Verz nice answer =1
    – Zarko
    Jan 13 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .