daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Sep 20th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. documentclass{article}
  2. usepackage[utf8]{inputenc}
  3. usepackage{tikz}
  4. usepackage{pgfplots}
  5. usepackage{amsmath}
  6. pgfplotsset{compat=1.12}
  7.  
  8. begin{document}
  9. begin{figure}[ht]
  10. centering
  11. begin{tikzpicture}
  12. begin{axis}[
  13.     width=0.6textwidth,
  14.     view={0}{90},
  15.     domain=0:2*pi+0.5,
  16.     y domain=0:2*pi+0.5,
  17.     xmax=2*pi+1, ymax=2*pi+1,
  18.     samples=15,
  19.     axis equal image,
  20.     axis lines = center,
  21.     xtick = {0,3.14,6.28},
  22.     ytick = {0,3.14,6.28},
  23.     xticklabels = {0,$pi$,$2pi$},
  24.     yticklabels = {0,$pi$,$2pi$}
  25. ]
  26. addplot3 [blue, quiver={u={1}, v={sin(deg(x))^2}, scale arrows=0.3, every arrow/.append style={-latex}}] (x,y,0);
  27. addplot [thick, red] {2-sin(deg(x))*cos(deg(x))/2+x/2};
  28. end{axis}
  29. end{tikzpicture}
  30.     caption{Retningsfelt (blå) for $dfrac{d  x}{d  t}=sin^2(t)$, med løsningskurve (rød) gennem $x(0)=2$.}
  31.   label{fig:bvp1}
  32. end{figure}
  33. end{document}
  34.    
  35. documentclass{article}
  36. usepackage[utf8]{inputenc}
  37. usepackage{tikz}
  38. usepackage{pgfplots}
  39. usepackage{amsmath}
  40. pgfplotsset{compat=1.12}
  41.  
  42. begin{document}
  43.  
  44. Original code
  45. begin{tikzpicture}
  46. begin{axis}[
  47.     width=0.6textwidth,
  48.     view={0}{90},
  49.     domain=0:2*pi+0.5,
  50.     y domain=0:2*pi+0.5,
  51.     xmax=2*pi+1, ymax=2*pi+1,
  52.     samples=15,
  53.     axis equal image,
  54.     axis lines = center,
  55.     xtick = {0,3.14,6.28},
  56.     ytick = {0,3.14,6.28},
  57.     xticklabels = {0,$pi$,$2pi$},
  58.     yticklabels = {0,$pi$,$2pi$}
  59. ]
  60. addplot3 [blue, quiver={u={1}, v={sin(deg(x))^2}, scale arrows=0.3, every arrow/.append style={-latex}}] (x,y,0);
  61. addplot [thick, red] {2-sin(deg(x))*cos(deg(x))/2+x/2};
  62. end{axis}
  63. end{tikzpicture}
  64.  
  65. Modified code
  66. begin{tikzpicture}
  67. begin{axis}[
  68.     width=0.6textwidth,
  69.     view={0}{90},
  70.     domain=0:2*pi+0.5,
  71.     y domain=0:2*pi+0.5,
  72.     xmax=2*pi+1, ymax=2*pi+1,
  73.     samples=15,
  74.     axis equal image,
  75.     axis lines = center,
  76.     xtick = {0,3.14,6.28},
  77.     ytick = {0,3.14,6.28},
  78.     xticklabels = {0,$pi$,$2pi$},
  79.     yticklabels = {0,$pi$,$2pi$}
  80. ]
  81. addplot3 [blue, quiver={u={1}, v={sin(deg(x))^2}, scale arrows=0.3, every arrow/.append style={-latex}}] {x};
  82. addplot [thick, red] {2-sin(deg(x))*cos(deg(x))/2+x/2};
  83. end{axis}
  84. end{tikzpicture}
  85.  
  86.  
  87. end{document}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top