Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{amsmath}
- usepackage[x11names]{xcolor}
- usepackage{tikz}
- usetikzlibrary{calc,intersections,positioning,arrows,arrows.meta,decorations.markings,decorations.pathreplacing}
- usepackage{pgfplots}
- pgfplotsset{compat=1.3}
- pgfplotsset{every x tick label/.append style={font=tiny, yshift=0.5ex}}
- pgfplotsset{every y tick label/.append style={font=tiny, xshift=0.5ex}}
- pgfplotsset{every axis plot/.append style={ thick}}
- usepgflibrary{shapes.misc}
- %arrows along parametric plot
- tikzset{
- set arrow inside/.code={pgfqkeys{/tikz/arrow inside}{#1}},
- set arrow inside={end/.initial=latex, opt/.initial=blue},
- /pgf/decoration/Mark/.style={
- mark/.expanded=at position #1 with
- {
- noexpandarrow[pgfkeysvalueof{/tikz/arrow inside/opt}]{pgfkeysvalueof{/tikz/arrow inside/end}}
- }
- },
- arrow inside/.style 2 args={
- set arrow inside={#1},
- postaction={
- decorate,decoration={
- markings,Mark/.list={#2}
- }
- }
- },
- }
- % end arrows along parametric plot
- begin{document}
- begin{center}
- begin{tikzpicture}[scale=2]
- begin{axis}[
- trig format plots=rad,
- axis lines=center,
- axis equal image,
- enlargelimits=true,
- unit vector ratio*=1 1,
- ]
- addplot [domain=0:2*pi,samples=200, Sienna1]({(x+2*sin(2*x))},{(x+2*cos(5*x))}) [arrow inside={}{0.02,0.12,0.25,0.35,0.42,0.52,0.65,0.75,0.90,0.97}];
- end{axis}
- end{tikzpicture}
- end{center}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement