Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. documentclass[11pt]{article}
  2.  
  3. begin{filecontents*}{table.dat}
  4. type v1 v2 v3 v4 v5 v6 v7
  5. t1 0 0 0 0 0 0 0 0 0 0 0 0 0 6
  6. t2 5 17 4 0 0 0 21 0 133 4 91 0 1 93
  7. t3 18 0 0 0 18 0 15 0 0 111 37 0 0 48
  8. t4 12 0 14 0 0 0 18 0 38 0 38 0 0 30
  9. t5 3 69 4 0 64 0 69 0 80 29 6 0 1 21
  10. t6 28 4 10 0 10 0 33 6 58 0 48 0 21 29
  11. t7 25 144 2 0 0 0 180 0 200 0 193 0 52 370
  12. end{filecontents*}
  13.  
  14. usepackage{pgfplots}
  15. pgfplotsset{compat=1.3}
  16.  
  17. usepackage{lipsum}
  18.  
  19. begin{document}
  20. lipsum[1]
  21. begin{figure}[h]
  22. begin{tikzpicture}
  23. begin{axis}[
  24. ybar=2pt,
  25. bar width=3pt,
  26. width=textwidth,
  27. height=3cm,
  28. axis lines=none,
  29. ytick=empty,
  30. symbolic x coords={ t1, t2, t3, t4, t5, t6, t7 }
  31. ]
  32.  
  33. addplot table[x=type, y=v1] {table.dat};
  34. addplot table[x=type, y=v2] {table.dat};
  35. addplot table[x=type, y=v3] {table.dat};
  36. addplot table[x=type, y=v4] {table.dat};
  37. addplot table[x=type, y=v5] {table.dat};
  38. addplot table[x=type, y=v6] {table.dat};
  39. addplot table[x=type, y=v7] {table.dat};
  40.  
  41. end{axis}
  42. end{tikzpicture}
  43. end{figure}
  44. lipsum[1]
  45. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement