# How to draw shade ball with two different colors?

I use \shade [ball color=black!60!red] (0,0) circle (4pt); command inside tikz image to represent a vertex of a graph. Now I am using some operation where two vertices are merged. So is it possible to have a shaded ball with two sided color?

I have gone through the following link, but it is a a circle type. I need a ball type. So is it possible? Please help.

  \documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{qqqqff}{rgb}{0.,0.,1.}
\definecolor{ffqqqq}{rgb}{1.,0.,0.}
\begin{figure}
\centering
\begin{tikzpicture}[ultra thick,x=1.0cm,y=1.0cm]
\draw (-1.,3.)-- (-1.,1.);
\draw (1.,1.)-- (3.,1.);
\draw (3.,1.)-- (2.,3.);
\draw (2.,3.)-- (1.,1.);
\draw (6.,3.)-- (5.,1.);
\draw (5.,1.)-- (7.,1.);
\draw (7.,1.)-- (6.,3.);
\draw (5.99,5.02)-- (5.99,3.02);
\draw (-1.2,3.5) node[anchor=north west] {$u$};
\draw (1.84,3.5) node[anchor=north west] {$v$};
\draw (6,3.5) node[anchor=north west] {$u+v$};
\begin{scriptsize}
\shade [ball color=ffqqqq] (-1.,3.) circle (5pt);
\shade [ball color=ffqqqq] (-1.,1.) circle (5pt);
\shade [ball color=qqqqff] (1.,1.) circle (5pt);
\shade [ball color=qqqqff] (3.,1.) circle (5pt);
\shade [ball color=qqqqff] (2.,3.) circle (5pt);
\shade [ball color=qqqqff] (6.,3.) circle (5pt);
\shade [ball color=qqqqff] (5.,1.) circle (5pt);
\shade [ball color=qqqqff] (7.,1.) circle (5pt);
\shade [ball color=ffqqqq] (5.99,5.02) circle (5pt);
\shade [ball color=ffqqqq] (5.99,3.02) circle (5pt);
\end{scriptsize}
\end{tikzpicture}
\caption{I am trying to color the vertex $u+v$ half red - half blue}
\end{figure}

\end{document}

• Please don't post code fragments. Instead put your fragments into a compilable document that shows what you are doing. – Alan Munn Sep 27 '17 at 4:04
• A suggestion is to try to use only cm or only pt so that you can easily automate your work by additions and subtractions of the lengths. In my answer I found the point by testing values but it could be much easier if I could use your dimensions and add or subtract some values. – koleygr Sep 27 '17 at 5:29

 \documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{qqqqff}{rgb}{0.,0.,1.}
\definecolor{ffqqqq}{rgb}{1.,0.,0.}
\begin{figure}
\centering
\begin{tikzpicture}[ultra thick,x=1.0cm,y=1.0cm]
\draw (-1.,3.)-- (-1.,1.);
\draw (1.,1.)-- (3.,1.);
\draw (3.,1.)-- (2.,3.);
\draw (2.,3.)-- (1.,1.);
\draw (6.,3.)-- (5.,1.);
\draw (5.,1.)-- (7.,1.);
\draw (7.,1.)-- (6.,3.);
\draw (5.99,5.02)-- (5.99,3.02);
\draw (-1.2,3.5) node[anchor=north west] {$u$};
\draw (1.84,3.5) node[anchor=north west] {$v$};
\draw (6,3.5) node[anchor=north west] {$u+v$};
\begin{scriptsize}
\shade [ball color=ffqqqq] (-1.,3.) circle (5pt);
\shade [ball color=ffqqqq] (-1.,1.) circle (5pt);
\shade [ball color=qqqqff] (1.,1.) circle (5pt);
\shade [ball color=qqqqff] (3.,1.) circle (5pt);
\shade [ball color=qqqqff] (2.,3.) circle (5pt);
\shade [ball color=qqqqff] (6.,3.) circle (5pt);
\shade [ball color=qqqqff] (5.,1.) circle (5pt);
\shade [ball color=qqqqff] (7.,1.) circle (5pt);
\shade [ball color=ffqqqq] (5.99,5.02) circle (5pt);
\caption{I am trying to color the vertex $u+v$ half red - half blue}

• @G_0_pi_i_e: \shade[ball color=ffqqqq] (6.,3.18) arc (90:270:5pt); instead of the previous arc drawing. – koleygr Sep 27 '17 at 13:55