1

It seems that this animation is not working. Can anyone see what I'm doing wrong?

\documentclass[tikz,border=5mm]{beamer}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{animate}
\usetikzlibrary{arrows,tikzmark,patterns}
\pgfplotsset{compat=1.18}% <- if you have an ol

\usepgfplotslibrary{groupplots,fillbetween} \DeclareMathOperator{\CDF}{cdf} \DeclareMathOperator{\PDF}{pdf}

\begin{document} \begin{frame} \begin{animateinline}[autoplay,loop]{1} %controls \multiframe{50}{i=-2.5+0.1}{ \begin{tikzpicture} \draw (0, 0) -- (1, 1); \end{tikzpicture} } \end{animateinline} \end{frame} \end{document}

It gives me this output

! Package calc Error: `.' invalid at this point.
! Package calc Error: `.' invalid at this point.
! Package animate Error: Contents of first frame must not have zero width.
! Package animate Error: Contents of first frame must not have zero height.
user202729
  • 7,143
Jakob Kruse
  • 229
  • 1
  • 10

1 Answers1

2

In this case because the first letter is i, it can only take integer values.

The prefix i of the loop variable ix declares it an integer variable. For non-integers, replace ix with rx.

Source: Animate PGF Plot from discrete data

user202729
  • 7,143