Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. pgfplotscreateplotcyclelist{gray}{ % define a new cycle list
  2. {fill=black!20},
  3. {fill=black!40},
  4. {fill=black!60}
  5. }
  6.  
  7.  
  8. begin{tikzpicture}
  9. begin{axis}[
  10. ymin = 0, ymax = 25,
  11. ybar,
  12. bar width=17, % added
  13. enlarge x limits=0.3,
  14. legend style={at={(0.7 ,1)},
  15. anchor=north,legend columns =-1},
  16. ylabel ={Gas Cost & Price in ETH},
  17. xlabel ={Sources Quantity},
  18. symbolic x coords ={7,14,21},
  19. xtick=data,
  20. nodes near coords ,
  21. nodes near coords align ={vertical},
  22. nodes near coords style={font=tiny}, % reduce font size of nodes near coords
  23. cycle list name=gray, % use the new cycle list
  24. ]
  25.  
  26. addplot coordinates {(7 ,11) (14,15) (21,19)};
  27. addplot coordinates {(7,5) (14,7) (21,9)};
  28.  
  29. addlegendentry{Gas}
  30. addlegendentry{ETH}
  31. end{axis}
  32. end{tikzpicture}
  33.  
  34. %7: 0.11449906 ETH - 5 724 953 Gas
  35. %14: 0.153421 ETH - 7 671 050 Gas
  36. %21: 0.1962195 ETH - 9 810 975 Gas
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement