I am trying to create a node which is half one colour half another and I am following the idea presented in this answer: https://tex.stackexchange.com/a/343674/42861
However, no mater what I assign shading angle to I always get a vertical split node.
All my nodes need the same split, so I decided to define a node style:
\tikzstyle{dc-node}=[node-base, shading angle=45, double color fill={AntiqueWhite}{LightBlue}]
Where node-base is basic style all my nodes follows:
\tikzstyle{node-base}=[circle, draw, align=center, font=\footnotesize, minimum size=1.3cm]
The include picture is generated using the following code:
\documentclass[svgnames]{standalone}
\usepackage{tikz}
\usepackage{lmodern}
\usetikzlibrary{shadows}
\usetikzlibrary{shapes}
\usetikzlibrary{positioning}
\usetikzlibrary{shadings}
\tikzset{
double color fill/.code 2 args={
\pgfdeclareverticalshading[%
tikz@axis@top,tikz@axis@middle,tikz@axis@bottom%
]{diagonalfill}{100bp}{%
color(0bp)=(tikz@axis@bottom);
color(50bp)=(tikz@axis@bottom);
color(50bp)=(tikz@axis@middle);
color(50bp)=(tikz@axis@top);
color(100bp)=(tikz@axis@top)
}
\tikzset{shade, left color=#1, right color=#2, shading=diagonalfill}
}
}
\tikzstyle{node-base}=[circle, draw, align=center, font=\footnotesize, minimum size=1.3cm]
\tikzstyle{dc-node}=[node-base, shading angle=45, double color fill={AntiqueWhite}{LightBlue}]
\begin{document}
\begin{tikzpicture}
\node[dc-node] (n1) at (0, 0) {N$_1$};
\node[dc-node] (n2) at (2.5, -.5) {N$_2$};
\end{tikzpicture}
\end{document}
My expectation was to get a tilt of 45 degress on the split, but clearly I do not get this. Have I missed something?


