Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{xcolor}
  3. usepackage{graphicx}
  4. usepackage{pgfplots}
  5. usepackage{amsmath}
  6.  
  7. usetikzlibrary{pgfplots.groupplots}
  8.  
  9.  
  10. begin{document}
  11. begin{tikzpicture}
  12. begin{groupplot}[
  13. group style={
  14. group name=my plots,
  15. group size=4 by 1,
  16. ylabels at=edge left
  17. },
  18. %footnotesize,
  19. %width=3cm,
  20. %height=7cm,
  21. ticks = none,
  22. tickpos=left,
  23. ytick align=outside,
  24. xtick align=outside,
  25. enlarge x limits=false,
  26. xlabel=$t$,
  27. ylabel = $y$,
  28. y tick label style={
  29. /pgf/number format/.cd,
  30. fixed,
  31. fixed zerofill,
  32. precision=2,
  33. /tikz/.cd},
  34. max space between ticks=2500pt,
  35. xmin = -.5,
  36. xmax = 10,
  37. ymin = -.5,
  38. ymax = 5,
  39. ]
  40. nextgroupplot[title=(a)]
  41. addplot[domain=0:2] {1};
  42. draw (axis cs:2,1) -- (axis cs:2,3.5) -- (axis cs: 5,3.5) -- (axis cs: 5,1);
  43. addplot[domain=5:10] {1};
  44. nextgroupplot[title=(b)]
  45. addplot[domain=0:2] {1};
  46. addplot[domain=2:6,smooth] {-.65*(x - 2)*(x - 6) + 1};
  47. addplot[domain=6:10] {1};
  48. nextgroupplot[title=(c)]
  49. addplot[domain=0:2] {1};
  50. draw (axis cs:2,1) -- (axis cs: 4.5,4) -- (axis cs:7,1);
  51. addplot[domain = 7:10] {1};
  52. nextgroupplot[title=(d)]
  53. draw[->] (axis cs:0,1) -- (axis cs:2.9,1) -- (axis cs:3,4.5) -- (axis cs: 3.1,1) -- (axis cs:10,1);
  54. end{groupplot}
  55. end{tikzpicture}
  56. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement