3

I want to draw a parabola with TikZ. Below is a minimal example, which gives me the error Cannot parse this coordinate at the last \draw line. If I remove the bend part, I do not get this error.

What did I do wrong?

\documentclass{article}
\usepackage{fontspec}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
    \draw (0, 0) parabola bend (3, 4);
\end{tikzpicture}
\end{document}
2
  • 1
    The parabola bend operation needs two coordinates at the end. See page 154 and 155 of the PGF manual.
    – Max
    Commented Jul 19, 2018 at 10:57
  • That's it, thanks! If you submit it as an answer, I will accept it. Commented Jul 19, 2018 at 11:28

1 Answer 1

5

The parabola bend operation needs three coordinates in total, one before it to define the start point, and two after it to define the bend location and the end point.

Some other uses of the parabola operation are (taken from the pgf manual, page 155):

\documentclass[tikz,margin=2mm]{standalone}

\begin{document}
    \begin{tikzpicture}
    \draw               (0,0) rectangle                (1,1.5)
                        (0,0) parabola                 (1,1.5);
    \draw[xshift=1.5cm] (0,0) rectangle                (1,1.5)
                        (0,0) parabola[bend at end]    (1,1.5);
    \draw[xshift=3cm]   (0,0) rectangle                (1,1.5)
                        (0,0) parabola bend (.75,1.75) (1,1.5);
    \draw[xshift=4.5cm] (1,1.5) --
                        (0,0) parabola                 cycle;
    \end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

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