0

I want to make a sine graph that translates horizontally, but do not know what attribute allows me to do this. There is a list of attributes on the TikZ manual chapter 116.2.1, but I can't mane any of them work.

A general way to make a number which changes over time either as a constant or coefficient in the addplot coommand would be very helpful, thanks.

MWE:

\documentclass[dvisvgm]{standalone}
\usepackage{tikz}
\usetikzlibrary{animations}
\usepackage{pgfplots}
\usepgfmodule{animations}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}[]
\begin{axis}[]
\pgfanimateattribute{}{
whom = addplot, entry = {0s}{1}, entry = {2s}{3} }
\addplot[]{sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{document}
  • AFAIK, animations are create externally. LaTeX can provide the PDFs. See https://tex.stackexchange.com/questions/295585/cube-in-tikz-not-drawn-correctly-possibly-a-bug-in-tikz for an example. – John Kormylo Apr 18 '23 at 00:44
  • Thank you for your response. The pgf animations module allows you to make annotations to the TikZ/pgf drawing which indicate some part of it should change over time. the "hard work" is left up to the document viewer. I want to know how to correctly leave that annotation. Also, I compile using latex (not pdflatex) and convert the dvi to svg. –  Apr 18 '23 at 00:47

0 Answers0