I want to plot a sphere showing its spherical coordinates. A possible Fig is given below. I want to enhance the look of the Fig with nice colour combination.
I have tried the following:
\documentclass[border=0.2cm]{standalone}
\usepackage{pgfplots}
\usepackage{tikz-3dplot}
\tdplotsetmaincoords{60}{115}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[tdplot_main_coords, scale = 2.5]
% Create a point (P)
\coordinate (P) at ({1/sqrt(3)},{1/sqrt(3)},{1/sqrt(3)});
% Draw shaded circle
\shade[ball color = blue,
%colormap/jet,
opacity = 0.5
] (0,0,0) circle (1cm);
% draw arcs
\tdplotsetrotatedcoords{0}{0}{0};
\draw[dashed,
tdplot_rotated_coords,
gray
] (0,0,0) circle (1);
\tdplotsetrotatedcoords{90}{90}{90};
\draw[dashed,
tdplot_rotated_coords,
gray
] (1,0,0) arc (0:180:1);
\tdplotsetrotatedcoords{0}{90}{90};
\draw[dashed,
tdplot_rotated_coords,
gray
] (1,0,0) arc (0:180:1);
% Projection of the point on X and y axes
\draw[thin, dashed] (P) --++ (0,0,{-1/sqrt(3)});
\draw[thin, dashed] ({1/sqrt(3)},{1/sqrt(3)},0) --++
(0,{-1/sqrt(3)},0);
\draw[thin, dashed] ({1/sqrt(3)},{1/sqrt(3)},0) --++
({-1/sqrt(3)},0,0);
% Axes in 3 d coordinate system
\draw[-stealth] (0,0,0) -- (1.80,0,0) node[below,black] {$x$};
\draw[-stealth] (0,0,0) -- (0,1.30,0)node[below,black] {$y$};
\draw[-stealth] (0,0,0) -- (0,0,1.30)node[above,black] {$z$};
\draw[dashed, gray] (0,0,0) -- (-1,0,0);
\draw[dashed, gray] (0,0,0) -- (0,-1,0);
% Line from the origin to (P)
\draw[thick, -stealth] (0,0,0) -- (P)node[above,black] {$P$};
% Add small circle at (P)
\draw[fill = blue!50] (P) circle (0.5pt);
\end{tikzpicture}
\end{document}
The above code provides the Fig below:
Specific questions:
- To plot a horizontal and a vertical circle passing through P as shown in the top Fig.
- To mark the angles with theta and phi
- To give the angle signs and right angle sign
- To give a different colour in the sphere-section, as mentioned in the attached top Fig.
- To beatify the colour combinations, keeping necessary information intact.

