1

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}

enter image description here

intStdu
  • 143

0 Answers0