Does anyone have a clue about why my last node is moving? I'm trying the overlay as stated in this post. Thank you very much!
\documentclass[xcolor=dvipsnames,10pt]{beamer}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
% Vectors
\begin{frame}[fragile]{Vectors}
\begin{figure}
\centering
\begin{tikzpicture} [nodes in empty cells, nodes={minimum width=0.7cm, minimum height=0.7cm}, row sep=-\pgflinewidth, column sep=-\pgflinewidth]
border/.style={draw}
\matrix(vector)[matrix of nodes, ampersand replacement=\&, row 1/.style={nodes={draw=none, minimum width=0.3cm}}, nodes={draw}] {
\scriptsize{0} \& \scriptsize{1} \& \scriptsize{2} \& \scriptsize{3} \& \scriptsize{4} \& \scriptsize{5} \& \scriptsize{6} \& \scriptsize{7} \& \scriptsize{8} \& \scriptsize{9} \& \scriptsize{10}
\only<1>{\\ |[fill=red!70]| G \& C\& A \& T \& C \& G \& C \& A \& G \& T \& A}
\only<2>{\\ G \& |[fill=red!70]| C\& A \& T \& C \& G \& C \& A \& G \& T \& A}
\only<3>{\\ G \& C\& |[fill=red!70]| A \& T \& C \& G \& C \& A \& G \& T \& A}
\only<4>{\\ G \& C\& A \& |[fill=red!70]| T \& C \& G \& C \& A \& G \& T \& A}
\only<5>{\\ G \& C\& A \& |[fill=red!70]| T \& |[fill=red!70]| C \& G \& C \& A \& G \& T \& A}
\only<6>{\\ G \& C\& A \& |[fill=red!70]| T \& |[fill=red!70]| C \& |[fill=red!70]| G \& C \& A \& G \& T \& A}
\only<7>{\\ G \& C\& A \& |[fill=red!70]| T \& |[fill=red!70]| C \& |[fill=red!70]| G \& |[fill=red!70]| C \& A \& G \& T \& A}
\only<8>{\\ G \& C\& A \& |[fill=red!70]| T \& |[fill=red!70]| C \& |[fill=red!70]| G \& |[fill=red!70]| C \& |[fill=red!70]| A \& G \& T \& A}\\
};
\end{tikzpicture}
\vspace{-.3in}
\begin{tikzpicture} [nodes in empty cells, nodes={minimum width=0.7cm, minimum height=0.7cm}, row sep=-\pgflinewidth, column sep=-\pgflinewidth]
border/.style={draw}
\matrix(vector)[matrix of nodes, ampersand replacement=\&, row 1/.style={nodes={draw=none, text width=0.3cm}}, nodes={draw}] {
\& \& \& \& \&
\only<1>{\\ |[fill=red!70]| T \& C \& G \& C \& A}
\only<2>{\\ |[fill=red!70]| T \& C \& G \& C \& A}
\only<3>{\\ |[fill=red!70]| T \& C \& G \& C \& A}
\only<4>{\\ |[fill=red!70]| T \& C \& G \& C \& A}
\only<5>{\\ |[fill=red!70]| T \& |[fill=red!70]| C \& G \& C \& A}
\only<6>{\\ |[fill=red!70]| T \& |[fill=red!70]| C \& |[fill=red!70]| G \& C \& A}
\only<7>{\\ |[fill=red!70]| T \& |[fill=red!70]| C \& |[fill=red!70]| G \& |[fill=red!70]| C \& A}
\only<8>{\\ |[fill=red!70]| T \& |[fill=red!70]| C \& |[fill=red!70]| G \& |[fill=red!70]| C \& |[fill=red!70]| A}\\
};
\end{tikzpicture}
\end{figure}
\end{frame}
\end{document}
