Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{pgfplots}
  3. begin{document}
  4.  
  5.  
  6. begin{tikzpicture}
  7. begin{axis}[
  8. title = {X},
  9. width=7cm,
  10. height= 9cm,
  11. xtick={1,...,3},
  12. xticklabels={%
  13. c1,
  14. c2,
  15. c3},
  16. ybar,
  17. ymajorgrids=true,
  18. x tick label style={rotate=45,anchor=east},
  19. x=70,
  20. bar width=0.5cm,
  21. enlarge x limits={abs=0.5cm},
  22. ylabel = {V},
  23. legend pos=outer north east,
  24. enlarge y limits={0.55,upper},
  25. enlarge y limits={0.386,lower},
  26. enlarge x limits=0.25
  27. ]
  28.  
  29. addplot[
  30. fill=blue!25,
  31. draw=black,
  32. point meta=y,
  33. every node near coord/.style={inner ysep=10pt},
  34. error bars/.cd,
  35. y dir=both,
  36. y explicit
  37. ]
  38. table [y error=error] {
  39. x y error label
  40. 1 9.642857143 1.949620581 1
  41. 2 9.357142857 2.767338661 2
  42. 3 11.85714286 3.907084095 3
  43. };
  44.  
  45. addplot[
  46. fill=red!25,
  47. draw=black,
  48. point meta=y,
  49. every node near coord/.style={inner ysep=10pt},
  50. error bars/.cd,
  51. y dir=both,
  52. y explicit
  53. ]
  54. table [y error=error] {
  55. x y error label
  56. 1 9.071428571 2.520325538 1
  57. 2 8.642857143 4.26961261 1
  58. 3 7.0714286 2.4042904 1
  59. };
  60.  
  61. draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});
  62. legend{one,two}
  63.  
  64. end{axis}
  65. end{tikzpicture}
  66.  
  67.  
  68. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement