Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. documentclass[a4paper]{standalone}
  2.  
  3. usepackage{pgfplots}
  4. usepgfplotslibrary{statistics}
  5. pgfplotsset{compat=1.8}
  6.  
  7. begin{document}
  8.  
  9. begin{tikzpicture}
  10. begin{axis}[
  11. boxplot/draw direction=y,
  12. ylabel={AAAAA},
  13. height=6cm,
  14. ymin=0,ymax=7,
  15. cycle list={{red},{black}},
  16. boxplot={
  17. %
  18. % Idea:
  19. % place the
  20. % group 1 at 0.3333 and 0.6666
  21. % group 2 at 1.3333 and 1.6666
  22. % group 3 at 2.3333 and 2.6666
  23. % ...
  24. % in a formular:
  25. draw position={1/3 + floor(plotnumofactualtype/2) + 1/3*mod(plotnumofactualtype,2)},
  26. %
  27. % that means the box extend must be at most 0.33333 :
  28. box extend=0.2
  29. },
  30. % ... it also means that 1 unit in x controls the width:
  31. x=1cm,
  32. % ... and it means that we should describe intervals:
  33. xtick={0,1,2,...,20},
  34. x tick label as interval,
  35. xticklabels={%
  36. {0.15},%
  37. {0.2},%
  38. {0.25},%
  39. {0.3},%
  40. {0.4},%
  41. {0.5},%
  42. {0.6},%
  43. {0.8},%
  44. {1.0},
  45. },
  46. x tick label style={
  47. text width=2.5cm,
  48. align=center
  49. },
  50. ]
  51. addplot
  52. table[row sep=\,y index=0] {
  53. data\
  54. 2.764\
  55. 2.938\
  56. 2.075\
  57. 1.493\
  58. 1.285\
  59. };
  60.  
  61. addplot
  62. table[row sep=\,y index=0] {
  63. data\
  64. 1.175\
  65. 2.813\
  66. 2.006\
  67. 3.893\
  68. 2.012\
  69. };
  70.  
  71. addplot
  72. table[row sep=\,y index=0] {
  73. data\
  74. 1.621\
  75. 3.659\
  76. 6.357\
  77. 2.851\
  78. 1.416\
  79. };
  80.  
  81. addplot
  82. table[row sep=\,y index=0] {
  83. data\
  84. 2.280\
  85. 1.482\
  86. 1.787\
  87. 2.326\
  88. 1.795\
  89. };
  90.  
  91. addplot
  92. table[row sep=\,y index=0] {
  93. data\
  94. 2.778\
  95. 2.388\
  96. 1.016\
  97. 1.328\
  98. 1.151\
  99. };
  100.  
  101. addplot
  102. table[row sep=\,y index=0] {
  103. data\
  104. 1.028\
  105. 1.571\
  106. 4.090\
  107. 3.875\
  108. 1.890\
  109. };
  110.  
  111. addplot
  112. table[row sep=\,y index=0] {
  113. data\
  114. 1.405\
  115. 1.188\
  116. 4.330\
  117. 3.665\
  118. 1.439\
  119. };
  120.  
  121. addplot
  122. table[row sep=\,y index=0] {
  123. data\
  124. 2.937\
  125. 1.320\
  126. 1.357\
  127. 1.852\
  128. 1.215\
  129. };
  130. %----------------------%
  131. addplot
  132. table[row sep=\,y index=0] {
  133. data\
  134. 2.778\
  135. 2.388\
  136. 1.016\
  137. 1.328\
  138. 1.151\
  139. };
  140.  
  141. addplot
  142. table[row sep=\,y index=0] {
  143. data\
  144. 1.028\
  145. 1.571\
  146. 4.090\
  147. 3.875\
  148. 1.890\
  149. };
  150.  
  151. addplot
  152. table[row sep=\,y index=0] {
  153. data\
  154. 1.405\
  155. 1.188\
  156. 4.330\
  157. 3.665\
  158. 1.439\
  159. };
  160.  
  161. addplot
  162. table[row sep=\,y index=0] {
  163. data\
  164. 2.937\
  165. 1.320\
  166. 1.357\
  167. 1.852\
  168. 1.215\
  169. };
  170.  
  171. %------------------------------%
  172.  
  173. addplot
  174. table[row sep=\,y index=0] {
  175. data\
  176. 1.405\
  177. 1.188\
  178. 4.330\
  179. 3.665\
  180. 1.439\
  181. };
  182.  
  183. addplot
  184. table[row sep=\,y index=0] {
  185. data\
  186. 2.937\
  187. 1.320\
  188. 1.357\
  189. 1.852\
  190. 1.215\
  191. };
  192. %----------------------%
  193. addplot
  194. table[row sep=\,y index=0] {
  195. data\
  196. 2.778\
  197. 2.388\
  198. 1.016\
  199. 1.328\
  200. 1.151\
  201. };
  202.  
  203. addplot
  204. table[row sep=\,y index=0] {
  205. data\
  206. 1.028\
  207. 1.571\
  208. 4.090\
  209. 3.875\
  210. 1.890\
  211. };
  212.  
  213. addplot
  214. table[row sep=\,y index=0] {
  215. data\
  216. 1.405\
  217. 1.188\
  218. 4.330\
  219. 3.665\
  220. 1.439\
  221. };
  222.  
  223. addplot
  224. table[row sep=\,y index=0] {
  225. data\
  226. 2.937\
  227. 1.320\
  228. 1.357\
  229. 1.852\
  230. 1.215\
  231. };
  232.  
  233.  
  234. end{axis}
  235. end{tikzpicture}
  236.  
  237.  
  238. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement