I have a figure where there is a train-test split visible. However, I would like to make the red part 'wider' than the blue part, but I cannot find an option in shapes.multipart that allows me to do this?
\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{shapes.multipart}
\begin{document}
\tikzset{
state/.style={
rectangle split,
rectangle split parts=2,
rectangle split part fill={blue!30,red!20},
rounded corners,
rectangle split horizontal,
draw=black, thick,
minimum height=6em,
text width=0.8cm,
minimum width=1.5em,
inner sep=2pt,
text centered,
fill opacity=0.5
}
}
\begin{figure}
\centering
\begin{tikzpicture}
\node [state] at (0,0) {Train \nodepart{two} Test } ;
\end{tikzpicture}
\caption{Caption}
\label{fig:my_label}
\end{figure}
\end{document}

\nodepart[text width=2cm]{two}to specify the width of the red part. – Teddy van Jerry Mar 24 '22 at 10:34Testinto{\\[-3em]Test}will at least give you that effect. Options in\nodepartare limited and not so flexible because I cannot usetext depth. – Teddy van Jerry Mar 24 '22 at 11:24