Advertisement
Guest User

Piecewise Function

a guest
Feb 14th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.66 KB | None | 0 0
  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] (-1.66,0) -- (9.56,0);
  9. \foreach \x in {-1.57,1.57,π,4.71,6.28,7.85,9.42}
  10. \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
  11. \draw[color=black] (9.26,0.08) node [anchor=south west] { x};
  12. \draw[->,color=black] (0,-1.36) -- (0,7.54);
  13. \foreach \y in {-1,1,2,3,4,5,6,7}
  14. \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
  15. \draw[color=black] (0.1,7.12) node [anchor=west] { y};
  16. \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
  17. \clip(-1.66,-1.36) rectangle (9.56,7.54);
  18. \draw plot[raw gnuplot, id=func3] function{set samples 100; set xrange [0.1:1.9]; plot cos((x*3.1415926535/2)*180/pi)+3};
  19. \draw plot[raw gnuplot, id=func4] function{set samples 100; set xrange [3.1:4.9]; plot 1/(x-5)+5};
  20. \draw plot[raw gnuplot, id=func5] function{set samples 100; set xrange [2.1:2.9]; plot -cos((x*3.1415926535/2)*180/pi)+3};
  21. \begin{scriptsize}
  22. \fill [color=uuuuuu] (0,4) circle (1.5pt);
  23. \draw[color=uuuuuu] (0.14,4.28) node {$A$};
  24. \fill [color=uuuuuu] (3,3) circle (1.5pt);
  25. \draw[color=uuuuuu] (3.16,3.28) node {$B$};
  26. \draw [color=uuuuuu] (2,2) circle (1.5pt);
  27. \draw[color=uuuuuu] (2.16,2.28) node {$D$};
  28. \draw [color=uuuuuu] (2,4) circle (1.5pt);
  29. \draw[color=uuuuuu] (2.16,4.28) node {$E$};
  30. \draw [color=uuuuuu] (3,4.5) circle (1.5pt);
  31. \draw[color=uuuuuu] (3.14,4.78) node {$F$};
  32. \end{scriptsize}
  33. \end{tikzpicture}
  34. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement