I'm a new latex user. I don't understand why the text I write is written in the space where my tikz picture is displayed on the document. In my source code document the text is written below the code for the tikz picture, yet when the document is compiled the text is displayed on the tikz picture. I want the text of my document to be displayed below the tikz picture not in the same place as the picture.
Here is my code:
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning, shadows , calc ,shapes}
\tikzstyle{rec style2}=[draw , shape = rectangle , fill = white , drop shadow , rounded corners , align = center , minimum height = 1cm , minimum width = 2cm]
\tikzstyle{diamond style} = [diamond, draw, minimum height = 0.8cm , minimum width = 0.8cm , font=\bfseries]
\newcommand*{\Shift}{1.5ex}
\begin{document}
%%%%% Tikz picture %%%%
\begin{figure}[h!]
\centering
\begin{tikzpicture}[transform
canvas={scale=0.6}]
\nodedraw , rec style2{Get \ tractor \ ready};
\nodedraw , diamond style, below of = n1 , node distance = 3cm{};
\draw [line width=1mm] ($(n2.north) - (0,\Shift)$)
-- ($(n2.south) + (0,\Shift)$)
($(n2.west) + (\Shift,0)$)
-- ($(n2.east) - (\Shift,0)$);
% Let's draw the invisible coordinates;
\nodeleft of = n2, coordinate, node distance = 3cm {};
\noderight of = n2, coordinate, node distance = 3cm {};
\noderight of = n2, coordinate, node distance = 6cm {};
% Second level of nodes;
\nodebelow of = cor1 , draw , rec style2 , node distance = 3cm{Driver \ coordination};
\nodebelow of = cor2 , draw , rec style2 , node distance = 3cm{Book \ equipment};
\nodebelow of = cor3 , draw , rec style2 , node distance = 3cm{Workers \ board \ tractor};
% Second level of invisible nodes;
\nodebelow of = n3, coordinate, node distance = 3cm {};
\nodebelow of = n4, coordinate, node distance = 3cm {};
\nodebelow of = n5, coordinate, node distance = 3cm {};
\nodedraw , diamond style, below of = n2 , node distance = 6cm{};
\draw [line width=1mm] ($(n6.north) - (0,\Shift)$)
-- ($(n6.south) + (0,\Shift)$)
($(n6.west) + (\Shift,0)$)
-- ($(n6.east) - (\Shift,0)$);
% Last nodes;
\nodebelow of = n6 , draw , rec style2 , node distance = 3cm{Drive to \ job site};
\nodebelow of = n7 , draw , rec style2 , node distance = 3cm{Clock at \ job site};
\nodebelow of = n8 , draw , rec style2 , node distance = 3cm{Walk to \ job site};
\nodebelow of = n9 , draw , rec style2 , node distance = 3cm{Start work };
% Let's start drawing the arrows and lines;
\draw[-{Latex[length=4.5mm]}] (n1) -- (n2);
\draw (n2) -- (cor1);
\draw[-{Latex[length=4.5mm]}] (cor1) -- (n3);
\draw (n2) -- (cor3);
\draw[-{Latex[length=4.5mm]}] (cor2) -- (n4);
\draw[-{Latex[length=4.5mm]}] (cor3) -- (n5);
\draw (n3) -- (cor4);
\draw[-{Latex[length=4.5mm]}] (cor4) -- (n6);
\draw (n4) -- (cor5);
\draw (n5) -- (cor6);
\draw[-{Latex[length=4.5mm]}] (cor6) -- (n6);
\draw [-{Latex[length=4.5mm]}] (n6) -- (n7);
\draw [-{Latex[length=4.5mm]}] (n7) -- (n8);
\draw [-{Latex[length=4.5mm]}] (n8) -- (n9);
\draw [-{Latex[length=4.5mm]}] (n9) -- (n10);
\end{tikzpicture}
\end{figure}
The transport system needs to be designed to incorporate all encompassing cases that relates to worker transportation. Firstly, workers need to be transported at the start of working days and between the working breaks to job sites. This is referred to as the transport process during non-operating hours. Secondly, workers often need to move from one block location to another block location. This process is known as the transport process during operating hours.
\end{document}


Just as important, when you use canvas transformations pgf loses track of positions of nodes and of picture sizes since it does not take the effect of canvas transformations into account when it computes coordinates of nodes.”](https://tikz.dev/tikz-transformations#sec-25.4)
– Qrrbrbirlbel Nov 30 '22 at 21:42figurefloats to where LaTeX thinks it's best. Just because it comes after or something other in your source doesn't mean this order will also be the same in the document. – Qrrbrbirlbel Nov 30 '22 at 21:44\tikzsetor\tikzstylebe used to define TikZ styles? – Qrrbrbirlbel Nov 30 '22 at 21:45