It seems that the mod()
function in PGF/TikZ has problems with negative values. The code
\draw [domain=-5:5, samples=100] plot (\x, {exp(mod(\x+1,2)-1)-1.5431});
will produce this:
Any ideas?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityTikZ has two modulo functions: mod()
and Mod()
. Mod()
will handle correctly negative values.
mod()
andMod()
. You are using the wrong one. See the manual for details