# Specify radius of an arc with pgfplots and axis direction cs?

I'm trying to draw an arc (the top half of a circle of radius 8, centered at (-8,0)) but I can't figure out how to specify the radius in pgfplots's coordinate system. Here's a MWE:

\pgfplotsset{compat=1.5.1}
\begin{tikzpicture}
\begin{axis}[
xmin=-20,xmax=20,
]
\addplot{x}; % not important, just to make things show up
\draw (axis cs:-16,0) arc[start angle=180, end angle=0,
\end{axis}
\end{tikzpicture}


I read about axis direction cs in the pgfplots manual, but it doesn't explain how to use it to calculate a distance like a radius -- it only says that for ellipses, it's done automatically. But I don't have an ellipse, I have an arc.

How can I specify a radius of 8 for my arc, using the coordinate system of my plot?

• Oops, this (mostly) a duplicate of tex.stackexchange.com/questions/60220/…, and the disabledatascaling solution there works for me. But I would still like to know if it's possible to use axis direction cs for this. – Dan Drake Jun 11 '14 at 16:05

You can transform the distance for the radius using the function transformdirectionx (which is the math parser equivalent to \pgfplotstransformdirectionx): \documentclass{article}

\usepackage{pgfplots}
\pgfplotsset{compat=1.5.1}
\begin{document}

\begin{tikzpicture}
\begin{axis}[
xmin=-10,xmax=10,
axis equal,
grid=both
]