Want more features on Pastebin? Sign Up, it's FREE!
Guest

Piecewise Function

By: a guest on Feb 14th, 2013  |  syntax: Latex  |  size: 1.44 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. \documentclass[12pt]{article}
  2. \usepackage{pgf,tikz}
  3. \usetikzlibrary{arrows}
  4. \pagestyle{empty}
  5. \begin{document}
  6. \definecolor{uuuuuu}{rgb}{0.27,0.27,0.27}
  7. \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
  8. \draw[->,color=black] (-3.74,0) -- (7.48,0);
  9. \foreach \x in {-3,-2,-1,1,2,3,4,5,6,7}
  10. \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
  11. \draw[->,color=black] (0,-3.34) -- (0,5.56);
  12. \foreach \y in {-3,-2,-1,1,2,3,4,5}
  13. \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
  14. \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
  15. \clip(-3.74,-3.34) rectangle (7.48,5.56);
  16. \draw[smooth,samples=100,domain=0.0:2.0] plot(\x,{cos(((\x)*3.1415926535/2)*180/pi)+3});
  17. \draw[smooth,samples=100,domain=3.0:5.0] plot(\x,{1/((\x)-5)+5});
  18. \draw[smooth,samples=100,domain=2.0:3.0] plot(\x,{0-cos(((\x)*3.1415926535/2)*180/pi)+3});
  19. \begin{scriptsize}
  20. \fill [color=uuuuuu] (0,4) circle (1.5pt);
  21. \draw[color=uuuuuu] (0.14,4.28) node {$A$};
  22. \fill [color=uuuuuu] (3,3) circle (1.5pt);
  23. \draw[color=uuuuuu] (3.16,3.28) node {$B$};
  24. \draw [color=uuuuuu] (2,2) circle (1.5pt);
  25. \draw[color=uuuuuu] (2.16,2.28) node {$D$};
  26. \draw [color=uuuuuu] (2,4) circle (1.5pt);
  27. \draw[color=uuuuuu] (2.16,4.28) node {$E$};
  28. \draw [color=uuuuuu] (3,4.5) circle (1.5pt);
  29. \draw[color=uuuuuu] (3.14,4.78) node {$F$};
  30. \end{scriptsize}
  31. \end{tikzpicture}
  32. \end{document}
clone this paste RAW Paste Data