Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{amsmath}
  3. usepackage[x11names]{xcolor}
  4. usepackage{tikz}
  5. usetikzlibrary{calc,intersections,positioning,arrows,arrows.meta,decorations.markings,decorations.pathreplacing}
  6. usepackage{pgfplots}
  7. pgfplotsset{compat=1.3}
  8. pgfplotsset{every x tick label/.append style={font=tiny, yshift=0.5ex}}
  9. pgfplotsset{every y tick label/.append style={font=tiny, xshift=0.5ex}}
  10. pgfplotsset{every axis plot/.append style={ thick}}
  11. usepgflibrary{shapes.misc}
  12.  
  13. %arrows along parametric plot
  14. tikzset{
  15. set arrow inside/.code={pgfqkeys{/tikz/arrow inside}{#1}},
  16. set arrow inside={end/.initial=latex, opt/.initial=blue},
  17. /pgf/decoration/Mark/.style={
  18. mark/.expanded=at position #1 with
  19. {
  20. noexpandarrow[pgfkeysvalueof{/tikz/arrow inside/opt}]{pgfkeysvalueof{/tikz/arrow inside/end}}
  21. }
  22. },
  23. arrow inside/.style 2 args={
  24. set arrow inside={#1},
  25. postaction={
  26. decorate,decoration={
  27. markings,Mark/.list={#2}
  28. }
  29. }
  30. },
  31. }
  32. % end arrows along parametric plot
  33.  
  34. begin{document}
  35. begin{center}
  36. begin{tikzpicture}[scale=2]
  37. begin{axis}[
  38. trig format plots=rad,
  39. axis lines=center,
  40. axis equal image,
  41. enlargelimits=true,
  42. unit vector ratio*=1 1,
  43. ]
  44. 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}];
  45. end{axis}
  46. end{tikzpicture}
  47. end{center}
  48. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement