If you only want to use the axis environment to draw the axis, then don't try to do anything else with it. Note: the scope is used to shift the origin.
I also simplified your angle labels. Later I came back and simplified all of the labels.
\documentclass{amsart}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings,backgrounds,patterns}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\begin{document}
\begin{tikzpicture}
\begin{axis}[width=5in,axis equal image,
axis lines=middle,
xmin=-5,xmax=5,
ymin=-1.5,ymax=5,
restrict y to domain=-1.5:5,
xtick={\empty},ytick={\empty},
axis line style={latex-latex},
xlabel=$x$,ylabel=$y$,
xlabel style={at={(ticklabel* cs:1)},anchor=north west},
ylabel style={at={(ticklabel* cs:1)},anchor=south west}
]
\coordinate (origin) at (0,0);
\end{axis}
\begin{scope}[shift={(origin)}]
%A triangle is drawn on the Cartesian plane. One side of the triangle is along
%the positive x-axis, and another side of the triangle is drawn in Quadrant II.
\coordinate (A) at (0,0);
\coordinate (B) at (3.5,0);
\coordinate (C) at ({5*cos(120)},{5*sin(120)});
\draw (A) -- (B) -- (C) -- cycle;
\coordinate (D) at (A-|C);% horizontal to (A), vertical to (C)
%The labels for A and B are typeset.
\node[below right] at (A){$A$};
\node[below] at (B){$B$};
%The label for C is typeset.
\node[blue,above left] at (C) {$C$};
%Angles are drawn for $\theta$ and its supplement.
\draw[draw=blue] (A) ++(120:0.4) arc (120:0:0.4)
node[midway,above right,inner sep=2pt,font={\footnotesize}]{$\theta$};
\draw[draw=blue,dash dot] (A) ++(180:0.6) arc (180:120:0.6)
node[midway,left,inner sep=2pt,font={\footnotesize}]{$\pi - \theta$};
%A right-angle mark is drawn.
\draw[dash dot] (D) +(0,3mm) -- +(3mm,3mm) -- +(3mm,0);
\draw[dashed] (C) -- (D);
%Braces indicating the distances that C is from the axes are typeset. To give
%them the appearance of being typeset over the axes, they are first typeset
%in white with a line width of 2pt, which is 10 times the thickness of the
%brace that is actually typeset.
\draw[draw=white,line width=4pt,decorate,decoration={brace,raise=.5em,amplitude=.5em}] (D) -- (C);
\draw[decorate,decoration={brace,raise=.5em,amplitude=.5em}] (D) -- (C)
node[midway,left=1em] {$r\sin\theta$};;
\draw[draw=white,line width=4pt,decorate,decoration={brace,raise=1ex,amplitude=1ex,mirror}] (D) -- (A);
\draw[decorate,decoration={brace,raise=1ex,amplitude=1ex,mirror}] (D) -- (A)
node[midway,below=2ex] {$r\cos\theta$};
\end{scope}
\end{tikzpicture}
\end{document}
![axis and scope](https://i.stack.imgur.com/aoV4U.png)
I think the polar
library is a "quick and dirty" implementation and seems not to be used very often, because there seem to be a couple of bugs in it, as you already have found out yourself. So it seems one has to place and draw all your needed stuff without the "intelligence" of PGFPlots.
If you want, you can add the bugs to the bug tacker. Best, each bug with a MWE.
\documentclass[border=2mm]{standalone}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.polar}
\pgfplotsset{width=10cm,compat=1.10}
\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[
domain=0:90,
ymin=0, ymax=1.5,
xmin=0, xmax=90,
xlabel={angle},
ylabel={radius},
ytick pos=left,
% move `yticklabels' below the axis line
% yticklabel pos=lower, % <-- doesn't seem to work in `polaraxis'
% move them down by hand
yticklabel style={
anchor=north,
yshift=-2pt,
},
% move ``radius'' label below the axis
ylabel style={
at={(axis cs:0,0.75)},
anchor=near ticklabel opposite,
yshift=-2ex,
},
% move ``angle'' label to 45° again
xlabel style={
at={(axis cs:45,1.7)},
sloped={at position=45},
anchor=near ticklabel,
near ticklabel at=45,
},
% don't draw the axis lines
axis line style={draw=none},
% in case you want to draw the yaxis lines only
% (but the line will then be drawn above marks ...)
after end axis/.code={
\draw (axis cs:0,1.5) -- (axis cs:0,0) -- (axis cs:90,1.5);
% test the width of the plot
\draw [red] (axis cs:-1,1.5) -- +(-5cm,0);
},
% % to scale only the axis (and not also the labels, etc.)
% scale only axis=true,
]
\addplot {1};
\end{polaraxis}
\end{tikzpicture}
\end{document}
![code showing the result of above code](https://i.stack.imgur.com/OEg3B.png)
Best Answer
As a simple workaround you could calculate the coordinates with a bit of trigonometry, which can be put in a macro. Note that with
compat=1.11
or neweraxis cs
is the default coordinate system. If you havecompat=1.10
or older you need to use(axis cs:\rtheta{1}{30})
.