
Empecé a aprender LaTex y hoy he empezado con tikz... pero me he encontrado con un problema y espero que no sea absolutamente estúpido. Ya (casi) terminé mi figura y ahora quería crear una sección. He puesto la sección encima de mi entorno tikz pero aun así, se muestra debajo de la figura en el pdf... ¿cómo soluciono esto?
mi código
\documentclass[]{article}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{cancel}
\usepackage{xcolor}
\usepackage[a4paper, total={6in, 9in}]{geometry}
%opening
\title{}
\author{}
\begin{document}
\section*{\LARGE Deriving; $y(t)=\hat{y}\cdot\sin(\omega t)$} %How do i get this up
hello
\begin{figure}
\begin{center}
\begin{tikzpicture}
\definecolor{circlecol}{HTML}{004AAD}
\definecolor{xaxis}{HTML}{8C52FF}
\definecolor{anglecon}{HTML}{6C0EAD}
\definecolor{yaxis}{HTML}{FF66C4}
\definecolor{hypo}{HTML}{38B6FF}
\draw [lightgray, dashed](0,-2) -- (0,2);
\draw [lightgray, dashed](-2,0) -- (2,0);
\draw [<->](2,0) -- (7.5,0) node [below] {$t$};
\draw [<->](2.25,-2) -- (2.25,2) node [left]{$y$};
\fill [hypo](0,0) -- (0.4,0) arc [start angle=0, end angle=40, radius=0.4] -- cycle;
\draw[line width=0.35mm, yaxis] (1.532,0) -- (1.532, 1.286)node[left, midway] {$y$};
\draw[line width=0.35mm, hypo] (0,0) -- (1.532, 1.286) node [left, midway] {$\hat{y}$};
\draw [line width=0.35mm, xaxis](0,0) -- (1.547,0) node [below, midway] {$\Delta t$};
\draw [line width=0.25mm, circlecol](0,0) circle [radius=2];
\fill [circlecol] (0,0) circle [radius=0.03];
\draw[->, yaxis, dashed] (1.532, 1.286) -- (7.5, 1.286);
\draw[circlecol] (2.25,0) sin (3,2) cos (3.75,0) sin (4.5,-2) cos (5.25, 0) sin(6,2) cos(6.75, 0) sin(7.5,-2);
\foreach \x in {3,3.75,...,6.75}\draw (\x,0.05) -- (\x,-0.05);
\foreach \y in {-1.5, -1,...,1.5}\draw (2.2,\y) -- (2.3,\y);
\end{tikzpicture}
\end{center}
\caption{Harmonic Oscillator}
\end{figure}
\end{document}