TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that the equations (t-sin t, 1-cos t) define a cycloid that looks like this: cycloid

However the code

\begin{axis}[title={Ciklois}, no markers]
\addplot[variable=\t, domain=0:360] ({t-sin(t)}, {1-cos(t)});

gives me this:

wrong cycloid

What's the problem? I know that gnuplot may help me out here, but I don't want to install it unless really necessary.

share|improve this question
See also tex.stackexchange.com/questions/12951 (\begin{axis}[trig format plots=rad]) – Dr. Manuel Kuehner Aug 18 '15 at 13:54
up vote 8 down vote accepted

You're doing a wrong calculation, consider making like this (the pgfplots is confused with degrees and radians so):

\addplot[variable=\t, domain=-2*pi:2*pi] ({t-sin(deg(t))}, {1-cos(deg(t))});

enter image description here

UPD: Updated with the comment of @ArTourter. That's a better solution.

share|improve this answer
probably a slightly easier code to use would be to use the deg function provided by pgfplots: t - sin(deg(t)) – ArTourter Dec 8 '12 at 16:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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