Guest User

Untitled

a guest
Jun 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. begin{tikzpicture}[scale=3, nodes={
  2. execute at begin node=$,
  3. execute at end node=$
  4. }]
  5. draw[-, thick] (-1,0) -- (1,0) node[above] {};
  6. foreach x/xpar/xtext in {
  7. -0.8 / | / +,
  8. -0.6 / | / ,
  9. -0.4 / | / +,
  10. -0.2 / | / -,
  11. 0 / | / ,
  12. .2 / | / -,
  13. .4 / | / +,
  14. .6 / | / -,
  15. .8 / | / +,
  16. } draw[thick] (x,0pt) node {xpar} node[below=5pt] {xtext};
  17. end{tikzpicture}
  18.  
  19. documentclass[tikz,border=3.14mm]{standalone}
  20. begin{document}
  21. begin{tikzpicture}[scale=3, nodes={
  22. execute at begin node=$,
  23. execute at end node=$
  24. }]
  25. draw[-, thick] (-1,0) -- (1,0) node[above] {};
  26. foreach x/xpar/xtext in {
  27. -0.8 / | / +,
  28. -0.6 / | / ,
  29. -0.4 / | / +,
  30. -0.2 / | / -,
  31. 0 / | / ,
  32. .2 / | / -,
  33. .4 / | / +,
  34. .6 / | / -,
  35. .8 / | / +,
  36. } draw[thick] (x,0pt) node {xpar} node[below=5pt] {xtext};
  37. draw[blue] plot[variable=x,samples=100,domain=-1:1] (x,{0.2*sin((x-0.3)*900)});
  38. end{tikzpicture}
  39. end{document}
  40.  
  41. documentclass[tikz,border=3.14mm]{standalone}
  42. begin{document}
  43. begin{tikzpicture}[scale=3, nodes={
  44. execute at begin node=$,
  45. execute at end node=$
  46. }]
  47. draw[-, thick] (-1,0) -- (1,0) node[above] {};
  48. foreach x/xpar/xtext in {-0.8,-0.6,...,0.8}
  49. {pgfmathtruncatemacro{y}{sign(sin((x-0.3)*900))}
  50. ifnumy=1
  51. defxtext{+}
  52. else
  53. defxtext{-}
  54. fi
  55. draw (x,-2pt) -- (x,2pt);
  56. node at (x,{-y*5pt}) {xtext};}
  57. draw[blue] plot[variable=x,samples=100,domain=-1:1] (x,{0.2*sin((x-0.3)*900)});
  58. end{tikzpicture}
  59. end{document}
  60.  
  61. documentclass[tikz,border=7pt]{standalone}
  62. begin{document}
  63. tikz
  64. draw[blue](,)foreach~in{+,-,+,-,+,-,+}
  65. {sin+(,~1)+(0,~-1)node[black,label={[scale=2]~-90:$~$}]{$|$}+(0,0)cos+(,~-1)}
  66. +(,0)edge[black,latex-](0,);
  67. end{document}
Add Comment
Please, Sign In to add comment