Como quebrar o texto em uma célula mesclada girada verticalmente?

Como quebrar o texto em uma célula mesclada girada verticalmente?

Eu tenho uma tabela e os códigos são fornecidos abaixo:

\begin{table}[]
\begin{tabular}{cc|cccccc|}
\cline{3-8}
\multicolumn{1}{l}{}                                                   
&            & \multicolumn{6}{c|}{\textbf{Time-period (t)}}                                                                                                                                                                                                                                
\\ \cline{3-8} 
\multicolumn{1}{l}{}                                                   
& \textbf{}  & \multicolumn{1}{c|}{\textbf{0}}               & 
\multicolumn{1}{c|}{\textbf{1}}               & \multicolumn{1}{c|} 
{\textbf{2}}               & \multicolumn{1}{c|}{\textbf{3}}               
& \multicolumn{1}{c|}{\textbf{4}}                   & \textbf{5}               
\\ \hline
\multicolumn{1}{|c|}{}                                                 
& \textbf{1} & \multicolumn{1}{c|}{{\color[HTML]{32CB00} 3}} & 
\multicolumn{1}{c|}{{\color[HTML]{000000} 3}} & \multicolumn{1}{c|} 
{{\color[HTML]{000000} 3}} & \multicolumn{1}{c|}{{\color[HTML] 
{000000} 3}} & \multicolumn{1}{c|}{{\color[HTML]{FF0000} -3}+ 
{\color[HTML]{32CB00}3}+3} & {\color[HTML]{000000} 3} \\ \cline{2- 
8} 
\multicolumn{1}{|c|}{}                                                 
& \textbf{2} & \multicolumn{1}{c|}{}                         & 
\multicolumn{1}{c|}{{\color[HTML]{32CB00} 3}} & \multicolumn{1}{c|} 
{3}                        & \multicolumn{1}{c|}{3}                        
& \multicolumn{1}{c|}{3}                            & 3                        
\\ \cline{2-8} 
\multicolumn{1}{|c|}{}                                                 
& \textbf{3} & \multicolumn{1}{c|}{}                         & 
\multicolumn{1}{c|}{}                         & \multicolumn{1}{c|} 
{{\color[HTML]{32CB00} 3}} & \multicolumn{1}{c|}{3}                        
& \multicolumn{1}{c|}{3}                            & 3                        
\\ \cline{2-8} 
\multicolumn{1}{|c|}{\multirow{-4}{*}{{\rotatebox[origin=c]{90} 
{\textbf{Sensor node $i \in V$}}}}} & \textbf{4} & \multicolumn{1} 
{c|}{}                         & \multicolumn{1}{c|}{}                         
& \multicolumn{1}{c|}{}                         & \multicolumn{1} 
{c|}{{\color[HTML]{32CB00} 3}} & \multicolumn{1}{c|}{3}                            
& 3                        \\ \hline
\end{tabular}
\end{table}

A mesa que estou pegando

Na primeira coluna, o texto sai da tabela. Como posso consertar isso?

Responder1

O código adicional a seguir satisfaz o requisito de agrupar o texto girado em várias linhas

 \begin{turn}{90}
                {
                            \tabular{@{}c@{}}
                             \textbf{Sensor} \\\textbf{node} \\\textbf{$i \in V$}
                                \endtabular
                } 
            \end{turn} 

insira a descrição da imagem aqui

MWE

\documentclass{article}
\usepackage{array}
\usepackage{multirow}
\usepackage{rotating,booktabs,xcolor}


\begin{document}
    
    \begin{table}[]
        \begin{tabular}{cc|cccccc|}
            \cline{3-8}
            \multicolumn{1}{l}{}                                                   
            &            & \multicolumn{6}{c|}{\textbf{Time-period (t)}}                                                                                                                                                                                                                                
            \\ \cline{3-8} 
            \multicolumn{1}{l}{}                                                   
            & \textbf{}  & \multicolumn{1}{c|}{\textbf{0}}               & 
            \multicolumn{1}{c|}{\textbf{1}}               & \multicolumn{1}{c|} 
            {\textbf{2}}               & \multicolumn{1}{c|}{\textbf{3}}               
            & \multicolumn{1}{c|}{\textbf{4}}                   & \textbf{5}               
            \\ \hline
            \multicolumn{1}{|c|}{}                                                 
            & \textbf{1} & \multicolumn{1}{c|}{{\color[HTML]{32CB00} 3}} & 
            \multicolumn{1}{c|}{{\color[HTML]{000000} 3}} & \multicolumn{1}{c|} 
            {{\color[HTML]{000000} 3}} & \multicolumn{1}{c|}{{\color[HTML] 
                    {000000} 3}} & \multicolumn{1}{c|}{{\color[HTML]{FF0000} -3}+ 
                {\color[HTML]{32CB00}3}+3} & {\color[HTML]{000000} 3} \\ \cline{2- 
                8} 
            \multicolumn{1}{|c|}{}                                                 
            & \textbf{2} & \multicolumn{1}{c|}{}                         & 
            \multicolumn{1}{c|}{{\color[HTML]{32CB00} 3}} & \multicolumn{1}{c|} 
            {3}                        & \multicolumn{1}{c|}{3}                        
            & \multicolumn{1}{c|}{3}                            & 3                        
            \\ \cline{2-8} 
            \multicolumn{1}{|c|}{}                                                 
            & \textbf{3} & \multicolumn{1}{c|}{}                         & 
            \multicolumn{1}{c|}{}                         & \multicolumn{1}{c|} 
            {{\color[HTML]{32CB00} 3}} & \multicolumn{1}{c|}{3}                        
            & \multicolumn{1}{c|}{3}                            & 3                        
            \\ \cline{2-8} 
            \multicolumn{1}{|c|}
            {
                \multirow{-4}{*}
                {
                     \begin{turn}{90}
                        {
                            \tabular{@{}c@{}}
                            
                                \textbf{Sensor} \\\textbf{node} \\ \textbf{$i \in V$}
                                
                                \endtabular
                            } 
            \end{turn} 
        }
    }
     & \textbf{4} & \multicolumn{1} 
            {c|}{}                         & \multicolumn{1}{c|}{}                         
            & \multicolumn{1}{c|}{}                         & \multicolumn{1} 
            {c|}{{\color[HTML]{32CB00} 3}} & \multicolumn{1}{c|}{3}                            
            & 3                        \\ \hline
        \end{tabular}
    \end{table}
\end{document}

informação relacionada