5

You can see from this example (found online) I have a radius of 1. Is there a way to increase the radius to four or five? I am trying to make a template for my students to graph on.

\documentclass[11pt]{minimal}
\usepackage{pgfplots}
\usepackage{tikz}
\usepgfplotslibrary{polar}
\usepackage{pgfplots}
    \pgfplotsset{compat=newest}

\pgfplotsset{my style polar/.append style={xticklabels={,, $\frac{\pi}{6}$, $\frac{\pi}{3}$, $\frac{\pi}{2}$, $\frac{2\pi}{3}$, $\frac{5\pi}{6}$, $\pi$, $\frac{7\pi}{6}$, $\frac{4\pi}{3}$, $\frac{3\pi}{2}$, $\frac{5\pi}{3}$,$\frac{11\pi}{6}$,}, thick }}

\begin{document}

\begin{tikzpicture} \begin{polaraxis}[my style polar] \end{polaraxis} \end{tikzpicture} \end{document}

Any help would be appreciated. I tried looking the PGFPlots manual in 5.10, but I didn't see how they were able to change the radius unless I had a graph.

enter image description here

Sebastiano
  • 54,118
Nick B
  • 831
  • Unrelated: Do not use the minimal class. https://tex.stackexchange.com/questions/42114/why-should-the-minimal-class-be-avoided – hpekristiansen Feb 19 '22 at 21:37

2 Answers2

4
\documentclass[border=1cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{polar}
\pgfplotsset{my style polar/.append style={xticklabels={,,
$\frac{\pi}{6}$, $\frac{\pi}{3}$, $\frac{\pi}{2}$, $\frac{2\pi}{3}$,
$\frac{5\pi}{6}$, $\pi$, $\frac{7\pi}{6}$, $\frac{4\pi}{3}$,
$\frac{3\pi}{2}$, $\frac{5\pi}{3}$,$\frac{11\pi}{6}$,}, thick }}
\begin{document}
\begin{tikzpicture}
\begin{polaraxis}[my style polar, ymax=4]
\end{polaraxis}
\end{tikzpicture}
\end{document}

Polar circle diagram

1

You need to recall your style AND ADD ONE FUNCTION TO PLOT. The code:

\documentclass[11pt]{minimal}
\usepackage{pgfplots}
\usepackage{tikz}
\usepgfplotslibrary{polar}

\pgfplotsset{compat=newest}

\pgfplotsset{my style polar/.append style={xticklabels={,, $\frac{\pi}{6}$, $\frac{\pi}{3}$, $\frac{\pi}{2}$, $\frac{2\pi}{3}$, $\frac{5\pi}{6}$, $\pi$, $\frac{7\pi}{6}$, $\frac{4\pi}{3}$, $\frac{3\pi}{2}$, $\frac{5\pi}{3}$,$\frac{11\pi}{6}$,}, thick }}

\begin{document}

\begin{tikzpicture}
    \begin{polaraxis}[xmin=0,xmax=360,
        domain=0:360,
        my style polar,
        no markers]
        \addplot +[orange, very thick, smooth] {3*cos(6*x)+2*sin(3*x)};
    \end{polaraxis}
\end{tikzpicture}

\end{document}

The output:

enter image description here