I have a diagram of part of a circle centered at the origin, an angle marked "alpha," a radius, and two line segments having an endpoint on the x-axis. It should have the following two modifications. (The first modification involves use of the overlay
command.)
As displayed in the diagram, the label (or node) "P = (r\cos\alpha, \, r\sin\alpha)" interferes with the dashed line segment between the x-axis and Q. It should be in a rectangular node over this line segment. (If the label is put in the north west position with respect to P, it should be in a rectangular node over the circle.)
The angle \alpha should be midway along the arc.
\documentclass[border=10pt]{standalone}%
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{calc,positioning,intersections}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\def\ang{50} % 0< \ang<90
\begin{document}
\begin{center}
\begin{tikzpicture}[
dot/.style={
fill,
circle,
inner sep=1.5pt
}
]
\clip (-1,-1) rectangle (7,7);
\draw[dashed,fill=white,name path=curve] (0,0) coordinate(O){} circle [radius=4];
\draw[<->] (-5,0) -- (5,0) node[below] {$x$};
\draw[<->] (0,-5) node (yaxis) {} -- (0,5) node[right] {$y$};
\path[name path=lineb] (0,0) -- (\ang:5);
\path[dashed] (0,0) -- (\ang:7);
\draw[dashed] (0,0) -- (4,4.76701437);
\draw[dashed] (4,0) -- (4,4.76701437);
\draw[dashed] (2.5711504,0) -- (2.5711504,3.06417777);
\node[dot,label={right:$P=(r\cos\alpha, \, r\sin\alpha)$}] at (2.5711504,3.06417777) {};
\node[dot,label={right:$Q=(r, \, r\tan\alpha)$}] at (4,4.76701437) {};
\draw[->] (0,0) --node[pos=1.25,above]{$\alpha$} (0.8,0) arc (0:\ang:0.8cm) ;
\path[name path=linec] (2,0) -- (2,3);
\draw[name intersections={of=lineb and linec, by={c}},thick]{};
\end{tikzpicture}
\end{center}
\end{document}