2

I want to draw the following tree using tikz. enter image description here

But I have already drawn the tree in vertical format. enter image description here

Is there any way to convert the above diagram horizontally?

MWE

\documentclass[a4paper, 10pt]{report}
\usepackage{times}%times new roman
\usepackage{bookmark}
\usepackage[margin=0.5in]{geometry}
\usepackage{multicol}
\usepackage{pdflscape}
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage{amssymb} %% for drwaaaaaaaaaaaaaaaing special symbols
\usepackage{empheq} %for box outside the equations
%%%%% Script for griffiths
% \usepackage{calligra}
% \DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n}
% \DeclareFontShape{T1}{calligra}{m}{n}{<->s*[2.2]callig15}{}
% \newcommand{\scripty}[1]{\ensuremath{\mathcalligra{#1}}}
%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%% script for griffths 2
\usepackage{calligra}
\DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n}
\DeclareFontShape{T1}{calligra}{m}{n}{<->s*[2.2]callig15}{}
\newcommand{\scriptr}{\mathcalligra{r}\,}
\newcommand{\boldscriptr}{\pmb{\mathcalligra{r}}\,}
%%%%%%%%%%%%%%%%%
\usepackage{graphicx}
\usepackage{graphics}

\usepackage{tikz} \usetikzlibrary{angles,quotes, arrows,arrows.meta,backgrounds,calc,decorations,decorations.markings,decorations.pathmorphing,fit,positioning,shapes.arrows,shapes.callouts,shapes.geometric,shapes.misc}
\usepackage{circuitikz} %for drwaing ee circuit \usepackage [edges, linguistics]{forest} % for drawing forest

\begin{document} \begin{center} \begin{forest} forked edges, [a [b][c[d][e]]]] \end{forest} \end{center} \end{document}

cabohah
  • 11,455

1 Answers1

5

You can use option grow=east. See the forest manual for more information about the option and how to set it for the node and all descendants using for tree:

\documentclass[a4paper, 10pt]{report}
\usepackage [edges, linguistics]{forest} % for drawing forest

\begin{document} \begin{center} \begin{forest} for tree={grow=east}, forked edges [a [b][c[d][e]]]] \end{forest} \end{center} \end{document}

grow east forest

Or using grow'=east to set reverse to true instead of false:

\documentclass[a4paper, 10pt]{report}
\usepackage [edges, linguistics]{forest} % for drawing forest

\begin{document} \begin{center} \begin{forest} for tree={grow'=east}, forked edges [a [b][c[d][e]]]] \end{forest} \end{center} \end{document}

enter image description here

Note: There manual also explains a grow'', that does not change reverse. In the example it would show the same result as grow.

cabohah
  • 11,455