Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{pgfplots}
  3. usepackage{pgfplotstable}
  4. usepackage{siunitx}
  5.  
  6. begin{document}
  7. pgfplotstableread[col sep = comma]{lossprob_jin1.csv}loadedtable
  8.  
  9. begin{figure*}
  10. centering
  11. begin{tikzpicture}
  12. begin{axis} [xlabel=Buffer-Size (bits),ylabel=Loss Probability (%), legend entries = {H=0.6448}]
  13. addplot table [x=xsw, y=plp, col sep=comma] {loadedtable} ;
  14. end{axis}
  15. end{tikzpicture}
  16. end{figure*}
  17. end{document}
  18.  
  19. documentclass{article}
  20. usepackage{pgfplots}
  21. pgfplotsset{compat=1.12}
  22. begin{document}
  23. begin{tikzpicture}
  24. begin{axis}[
  25. scaled y ticks=false,
  26. y tick label style={
  27. /pgf/number format/fixed,
  28. /pgf/number format/precision=0
  29. },
  30. yticklabel=0.02421307pgfmathprintnumber{tick},
  31. x tick label style={
  32. /pgf/number format/1000 sep={}
  33. },
  34. xlabel=Buffer size in bits,
  35. ylabel=Loss proabiblity in %
  36. ]
  37. addplot[raw gnuplot, mark=*] gnuplot {
  38. plot 'data.dat' using 2:($1-0.02421307)*1e10;
  39. };
  40. end{axis}
  41. end{tikzpicture}
  42. end{document}
  43.  
  44. documentclass{standalone}
  45. usepackage{tikz,pgfplots,pgfplotstable}
  46. pgfplotsset{compat=1.12}
  47. usepackage{siunitx}
  48. begin{document}
  49. pgfplotstableread
  50. {
  51. x y
  52. 0 2.42130785530195E-02
  53. 113.8 2.42130783443945E-02
  54. 227.6 2.42130781357695E-02
  55. 341.3 2.42130779271445E-02
  56. 455.1 2.42130777185196E-02
  57. 568.9 2.42130775098946E-02
  58. 682.7 2.42130773012696E-02
  59. 796.4 2.42130770926447E-02
  60. 910.2 2.42130768840197E-02
  61. 1024 2.42130766753947E-02
  62. }Bsizeloss
  63. begin{tikzpicture}
  64. begin{axis}[xlabel={Buffer-Size (bits)},
  65. ylabel={Loss Probability, % ($times 10^{10}-242130700$)},
  66. ytick={67,73,79,85},
  67. legend entries = {H=0.6448},
  68. grid = major
  69. ]
  70. addplot+ table[y expr=directlua{tex.print(thisrow{y}*1E10-242130700)},x=x] {Bsizeloss};
  71. end{axis}
  72. end{tikzpicture}
  73.  
  74. documentclass{standalone}
  75. usepackage{tikz,pgfplots,pgfplotstable}
  76. pgfplotsset{compat=1.12}
  77. %usepackage{siunitx}% seems not needed in this mwe
  78. usepackage{xintexpr}
  79. begin{document}
  80. pgfplotstableread
  81. {
  82. x y
  83. 0 2.42130785530195E-02
  84. 113.8 2.42130783443945E-02
  85. 227.6 2.42130781357695E-02
  86. 341.3 2.42130779271445E-02
  87. 455.1 2.42130777185196E-02
  88. 568.9 2.42130775098946E-02
  89. 682.7 2.42130773012696E-02
  90. 796.4 2.42130770926447E-02
  91. 910.2 2.42130768840197E-02
  92. 1024 2.42130766753947E-02
  93. }Bsizeloss
  94. begin{tikzpicture}
  95. begin{axis}[xlabel={Buffer-Size (bits)},
  96. ylabel={Loss Probability, % ($times 10^{10}-242130700$)},
  97. ytick={67,73,79,85},
  98. legend entries = {H=0.6448},
  99. grid = major
  100. ]
  101. addplot+ table[y expr=xintthefloatexprthisrow{y}*1E10-242130700relax,x=x] {Bsizeloss};
  102. end{axis}
  103. end{tikzpicture}
  104. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement