3

I need to draw a polar coordinate system without border lines. Adding axis lines=none (without star) to pgfplot's polaraxis argument list blanks out the coordinate system completely (including grid lines, tick lines, etc). Adding axis lines*=none (with star) as in the following MWE removes the black axis line at the inner edge and the left edge of the sector. That's already half the job -- how can I remove the outer edge and the right edge? (cf. screenshot below)

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.polar}
\pgfplotsset{compat=newest}
\begin{document}
    \begin{tikzpicture} 
        \begin{polaraxis}[%
                        xmin=-5,%
                        xmax=95,%
                        ymin=10,%
                        ymax=30,%
                        axis lines*=none,%
                        ]
        \end{polaraxis}
    \end{tikzpicture}
\end{document}

result of MWE with only the outer and right axis line remaining

2 Answers 2

2

Add axis line style = {draw=white,line width=0.0001pt}, to the options (bit of a hack though). You can even omit draw=white and simply put axis line style = {line width=0.0001pt},. Line is there but invisible.

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{pgfplots.polar}
\pgfplotsset{compat=newest}
\begin{document}
    \begin{tikzpicture}
        \begin{polaraxis}[%
                        xmin=-5,%
                        xmax=95,%
                        ymin=10,%
                        ymax=30,%
                        axis lines*=none,%
                        axis line style = {draw=white,line width=0.0001pt},
                        ]
        \end{polaraxis}
    \end{tikzpicture}
\end{document}

enter image description here

1
  • 1
    It turns out that axis line style = {transparent} also works :-). Aug 19, 2014 at 11:23
0

I had the same problem and found that for a decent version of pgfplot (I'm running on 3.1.1) it is possible to add axis line style = {draw=none} to the polaraxis options. I prefer not to draw the lines rather than make them invisible.

Knowing that, the following code

\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\begin{document}
\begin{tikzpicture}
    \begin{polaraxis}
    [%
        axis line style = {draw=none},%
        xmin = -5,%
        xmax = 95,%
        ymin = 10,%
        ymax = 30,%
    ]
    \end{polaraxis}
\end{tikzpicture}
\end{document}

produces

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .