Anyone can help me?
This is my code:
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{collcell} \newcommand*{\MinNumber}{1.0}% \newcommand*{\MidNumber}{2.0} % \newcommand*{\MaxNumber}{3.0}% %Apply the gradient macro \newcommand{\ApplyGradient}[1]{% \ifdim #1 pt > \MidNumber pt \pgfmathsetmacro{\PercentColor}{max(min(100.0*(#1 - \MidNumber)/(\MaxNumber-\MidNumber),100.0),0.00)} % \hspace{-0.33em}\colorbox{red!\PercentColor!red}{#1} \else \pgfmathsetmacro{\PercentColor}{max(min(100.0*(\MidNumber - #1)/(\MidNumber-\MinNumber),100.0),0.00)} % \hspace{-0.33em}\colorbox{green!\PercentColor!green}{#1} \fi } \newcolumntype{R}{>{\collectcell\ApplyGradient}c<{\endcollectcell}} \renewcommand{\arraystretch}{0} \setlength{\fboxsep}{3mm} % box size \setlength{\tabcolsep}{0pt} \begin{document} \vspace{1cm} \begin{figure} \centering %\includegraphics[scale=0.4]{fig/PNBOIA_vitoria.png} % Include the image placeholder.png \caption{Metocean forecast results.} %\caption{Espectro direcional} %\end{center} \end{figure} \begin{table} \renewcommand{\baselinestretch}{2} \caption{Metocean Forecast Table.} \center \label{tabela_periodo} \begin{tabular}{| c | *{8}{R}} \hline \textbf{20180807} & \textbf{00h} & \textbf{03h} & \textbf{06h} & \textbf{09h} & %\textbf{12h} & \textbf{15h} & \textbf{18h} & \textbf{21h} \\ \hline \textbf{Significant Wave Height (m)} & 1.31 & 1.26 & 1.25 & 1.27 & 1.57 & 1.90 & 2.09 & 1.93 \\ \hline \textbf{Peak Period (s)} & 8.8 & 8.7 & 8.8 & 9.5 & 9.9 & 5.7 & 6.2 & 6.5 \\ \hline \textbf{Peak Direction (degree)} & 130 & 130 & 130 & 135 & 136 & 191 & 183 & 172 \\ \hline \textbf{Wind Speed (m/s)} & 1.0 & 1.1 & 3.0 & 7.4 & 8.9 & 10.4 & 10.9 & 8.2 \\ \hline \textbf{Wind Direction (degree)} & 36 & 359 & 261 & 224 & 199 & 194 & 188 & 170 \\ \hline \textbf{Tide} & 1.09 & 0.65 & 0.33 & 0.82 & 1.26 & 0.91 & 0.43 & 0.73\\ \hline \end{tabular} \end{table} \end{document}