Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pgfplotscreateplotcyclelist{gray}{ % define a new cycle list
- {fill=black!20},
- {fill=black!40},
- {fill=black!60}
- }
- begin{tikzpicture}
- begin{axis}[
- ymin = 0, ymax = 25,
- ybar,
- bar width=17, % added
- enlarge x limits=0.3,
- legend style={at={(0.7 ,1)},
- anchor=north,legend columns =-1},
- ylabel ={Gas Cost & Price in ETH},
- xlabel ={Sources Quantity},
- symbolic x coords ={7,14,21},
- xtick=data,
- nodes near coords ,
- nodes near coords align ={vertical},
- nodes near coords style={font=tiny}, % reduce font size of nodes near coords
- cycle list name=gray, % use the new cycle list
- ]
- addplot coordinates {(7 ,11) (14,15) (21,19)};
- addplot coordinates {(7,5) (14,7) (21,9)};
- addlegendentry{Gas}
- addlegendentry{ETH}
- end{axis}
- end{tikzpicture}
- %7: 0.11449906 ETH - 5 724 953 Gas
- %14: 0.153421 ETH - 7 671 050 Gas
- %21: 0.1962195 ETH - 9 810 975 Gas
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement