# How can I draw a wavelet system in Latex?

I'm trying to draw a figure to introduce a wavelet transform system as follows. I used tikzpicture to draw a lot of block nodes and connected them using arrow. However, I am struggling in the left-most and right-most part of the picture. Specifically, I don't know how to neither creat a "point", where some text in the left side or right side of this point, or make sure this "point" is between the two rows.

• Could you add a minimal code? – user156344 Apr 1 at 15:34

Welcome to TeX-SE! With forest it is easy (but of course I did not punch in texts from your screen shot). Also adding the annotations is easy, I did this only for rows but once you have sufficiently many levels you can add the analogous statements for those, too.

\documentclass[border=3.14mm]{standalone}
\usepackage[edges]{forest}

\begin{document}

\begin{forest}
for tree={grow'=east,l sep+=4mm,s sep+=2mm,
draw, semithick,forked edges,edge={-latex},
before typesetting nodes={
where level=0{draw=none}{},
where level=1{label=above:\emph{rows}}{},
where level=4{label=above:\emph{columns}}{},
% you can add the other labels at the respective levels analogously
where n children=0{draw=none}{}
}
}
[Start
[A
[A1
[A1a
[A11 [A11a]]
[A12 [A12a]]
]
]
[A2
[A2a
[A21 [A21a]]
[A22 [A22a]]
]
]
]
[B
[B1
[B1a
[B11 [B11a]]
[B12 [B12a]]
]
]
[B2
[B2a
[B11 [B11a]]
[B12 [B12a]]
]
]
]
]
\end{forest}
\end{document}


• Thank you for your answer! By your influence I am trying to learn the forest method instead of creating nodes in tikz. Another interesting question is, what if I would like to add some texts above the line after A1a? Since the line after A1a is too short, I guess I need to lengthen the line after A1a first, and add some texts above it then? – mgcy Apr 2 at 5:34
• @mgcy You do not have to lengthen the text. One out of many possibilities is to replace where n children=0{draw=none}{} by where n children=0{draw=none,label={[anchor=south west]above left:some long text}}{}. There are many other possibilities. – user121799 Apr 2 at 12:55
• I tired your solution but it doesn't look descent. It is my bad for the ambiguous description. I would better attach a picture. The picture is above in the original question. – mgcy Apr 2 at 15:07
• @mgcy No, you should not attach a picture but some code that at least contains all the relevant texts. Why do you think anyone is excited to type in texts from a screen shot? It is fine if you use my above code for that. (The rules of this site would suggest that you accept this answer and use the code for a follow-up question because I believe that what you are asking now is not part of the original question.) – user121799 Apr 2 at 15:10