# Plotting in Polar coordinates

I expected the following polar plot to generate something that looks like a parabola. It does not.

\documentclass[a4paper,11pt]{article}
\usepackage{array}
\usepackage{float}
\usepackage{tikz}
\usepackage{tikz}
\usepackage{Pgfplots}
\usepgfplotslibrary{polar}
% define the title
\title{A Math Problems}
\author{Robert~J.~Sherry}
\restylefloat{figure}
\begin{document}
\maketitle
\noindent
\newline
Here is a plot in polar coordinates.
\newline
\begin{tikzpicture}
\begin{polaraxis}
{4*tan(x)*sec(x)};
% equivalent to (x,{sin(..)cos(..)}), i.e.
% the expression is the RADIUS
\end{polaraxis}
\end{tikzpicture}
\newline
\end{document}


The output as a .10e5 in it. Actually the 5 is raised like an exponent. I do not understand why. Is that a scaling factor?

In any case, what is generated does not look like a parabola to me. The function I am plotting should be r = 4tan(x) sec(x). In rectangular coordinates that function is 4y = x^2. What am I doing wrong?

• It's just a very thin parabola. Try domain=0:80 and 81, and 82, ..., 89 Commented Sep 10, 2021 at 3:08
• Use \begin{polaraxis}[ymax=10] to ignore anything beyond r=10 circle. Commented Sep 10, 2021 at 3:10
• Yes, the 10e5 is a scaling factor, you're dividing by zero when x=pi/2 and 3pi/2, so the function becomes a bit large when close to those values. Commented Sep 10, 2021 at 17:33

Here is an answer that works for me. I split the parabola up into two parts.

\documentclass[a4paper,11pt]{article}
\usepackage{array}
\usepackage{float}
\usepackage{tikz}
\usepackage{tikz}
\usepackage{Pgfplots}
\usepgfplotslibrary{polar}
% define the title
\title{A Math Problems}
\author{Robert~J.~Sherry}
\restylefloat{figure}
\begin{document}
\maketitle
\noindent
\newline
Here is a plot in polar coordinates.
\newline
\begin{tikzpicture}
\begin{polaraxis}