Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.56 KB | None | 0 0
  1. \documentclass[]{article}
  2. \usepackage{pgf,tikz}
  3. \usepackage{pgfplots}
  4. \begin{document}
  5. \begin{tikzpicture}
  6. [scale=0.5]
  7. \begin{axis}[
  8. ybar,
  9. enlarge x limits=0.04,
  10. enlarge y limits=0,
  11. legend style={at={(0.5,-0.3)}, anchor=north,legend columns=-1},
  12. nodes near coords style={anchor=west, rotate=90},  
  13. ylabel={Time (ns)},
  14. width=20cm,
  15. symbolic x coords=
  16.   {A,
  17.     B,
  18.     C,
  19.     D,
  20.     E,
  21.     F,
  22.     G,
  23.     H,
  24.     I,
  25.     J,
  26.     K,
  27.     L,
  28.     M,
  29.     N,
  30.     O,
  31.     P,
  32.     Q,
  33.     R,
  34.     S,
  35.     T,
  36. },
  37. xtick=data,
  38. ymin=0,
  39. ymax=1700,
  40. restrict y to domain*=0:10000,
  41. visualization depends on=rawy\as\rawy,
  42. after end axis/.code={\draw [ultra thick, white, decoration={snake, amplitude=1pt}, decorate] (rel axis cs:0,1.05) -- (rel axis cs:1,1.05);},
  43. nodes near coords={\pgfmathprintnumber{\rawy}},
  44. clip=false,
  45. %nodes near coords align={vertical},
  46. x tick label style={rotate=60,anchor=east}
  47. ]
  48.  
  49. \addplot coordinates {
  50.     (A,27.53  )
  51.     (B,33.71  )
  52.     (C,9238.36)
  53.     (D,9184.26)
  54.     (E,119.82 )
  55.     (F,57.62  )
  56.     (G,28.11  )
  57.     (H,101.59 )
  58.     (I,245.64 )
  59.     (J,316.80 )
  60.     (K,107.50 )
  61.     (L,334.93 )
  62.     (M,395.91 )
  63.     (N,558.37 )
  64.     (O,588.47 )
  65.     (P,166.14 )
  66.     (Q,183.95 )
  67.     (R,619.40 )
  68.     (S,95.75  )
  69.     (T,134.50 )};
  70.  
  71. \addplot coordinates {
  72.     (A,79.48  )
  73.     (B,95.78  )
  74.     (C,9926.58)
  75.     (D,9864.55)
  76.     (E,314.25 )
  77.     (F,165.87 )
  78.     (G,58.52  )
  79.     (H,188.77 )
  80.     (I,188.34 )
  81.     (J,343.45 )
  82.     (K,196.34 )
  83.     (L,1387.44)
  84.     (M,1671.64)
  85.     (N,604.58 )
  86.     (O, 688.11)
  87.     (P,286.23 )
  88.     (Q,936.79 )
  89.     (R,757.05 )
  90.     (S,205.32 )
  91.     (T,200.74 )};
  92. \legend{Do not collides,Collides}
  93. \end{axis}
  94. \end{tikzpicture}
  95.  
  96. \end{document}
  97.  
  98.  
  99. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement