1

Sometimes data to be plotted on a polar plot take large values in a specific direction. Is it possible to shape a polar plot created with pgfplots and the polaraxis environment (for example via clipping) so that it looks like the following picture?

enter image description here

3

pgfplots supports no boxed polar plots of this sort.

You can merely reduce the plotted range using xmin and xmax.

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\pgfplotsset{compat=1.13}

\begin{document}

\begin{tikzpicture}
      \begin{polaraxis}[
        xmin=0,
        xmax=180,
        ytick distance=0.2,
        yticklabel style={anchor=near yticklabel opposite},
        minor x tick num=2,
        grid=both,
      ]
      \addplot[blue] table {
        0 1
        10 0.7
        20 0.5
        60 0.2
        80 0.25
        90 0.26
        100 0.25
        120 0.2
        160 0.5
        180 1
        };
      \end{polaraxis}
\end{tikzpicture}

\end{document}

enter image description here

  • 1
    Hi Christian! That's what I ended up doing at the end. Thanks! (A boxed polar plot would be a nice new feature though.) – Antonio Sep 22 '16 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.