Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.68 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{tikz}
  3. usepackage{pgfplots}
  4.  
  5. begin{document}
  6. begin{tikzpicture}
  7. begin{axis}[
  8. xbar stacked,
  9. bar width=15pt,
  10. xlabel={Number of total errors $|$ Bars: incorrectly predicted class},
  11. ylabel={Target class},
  12. yticklabels={E,T,M,N,A,6/W,O,K,R,S,7,F,I,1,3,G,X,4,5,B,H},
  13. symbolic y coords={E,T,M,N,A,6/W,O,K,R,S,7,F,I,1,3,G,X,4,5,B,H},
  14. xtick={0,2,4,6,8,10,12,14,16,18},
  15. ytick=data,
  16. width=12.2cm,
  17. height=7.1cm,
  18. axis y line*=none,
  19. axis x line*=bottom,
  20. ]
  21. addplot[fill=gray!50!black,draw=black] coordinates {(5,E) (8,T) (8,M) (5,N) (3,A) (6,6/W) (5,O)};
  22. addplot[fill=gray!50!black,draw=black] coordinates {(4,E) (6,T) (3,M) (2,N) (3,A) (1,6/W) (1,O)};
  23. addplot[fill=gray!50!black,draw=black] coordinates {(3,E) (1,T) (2,M) (2,N) (2,A) (0,6/W) (1,O)};
  24. addplot[fill=gray!50!black,draw=black] coordinates {(2,E) (1,T) (1,M) (1,N) (1,A) (0,6/W) (0,O)};
  25. addplot[fill=gray!50!black,draw=black] coordinates {(1,E) (0,T) (0,M) (1,N) (1,A) (0,6/W) (0,O)};
  26. addplot[fill=gray!50!black,draw=black] coordinates {(1,E) (0,T) (0,M) (0,N) (0,A) (0,6/W) (0,O)};
  27. addplot[fill=gray!50!black,draw=black] coordinates {(1,E) (0,T) (0,M) (0,N) (0,A) (0,6/W) (0,O)};
  28.  
  29. coordinate (ES) at (-10,0);
  30. coordinate (EM) at (16mm,0);
  31. coordinate (ET) at (41mm,0);
  32. coordinate (EH) at (60mm,0);
  33. coordinate (EA) at (72.8mm,0);
  34. coordinate (EO) at (79mm,0);
  35. coordinate (EP) at (85.3mm,0);
  36.  
  37. coordinate (TA) at (-10,7.5mm);
  38. coordinate (TS) at (34.7mm,7.5mm);
  39. coordinate (TE) at (72.8mm,7.5mm);
  40. coordinate (TN) at (79mm,7.5mm);
  41.  
  42. coordinate (MN) at (-10,15.5mm);
  43. coordinate (MT) at (34.7mm,15.5mm);
  44. coordinate (MA) at (54mm,15.5mm);
  45. coordinate (MS) at (66.6mm,15.5mm);
  46.  
  47. coordinate (NM) at (-10,23.1mm);
  48. coordinate (NA) at (16mm,23.1mm);
  49. coordinate (NH) at (28.5mm,23.1mm);
  50. coordinate (NT) at (41mm,23.1mm);
  51. coordinate (NY) at (47.4mm,23.1mm);
  52.  
  53. coordinate (AE) at (-10,30.8mm);
  54. coordinate (AN) at (3.2mm,30.8mm);
  55. coordinate (AM) at (22.1mm,30.8mm);
  56. coordinate (AP) at (34.7mm,30.8mm);
  57. coordinate (AT) at (41mm,30.8mm);
  58.  
  59. coordinate (6W7) at (-10,38.2mm);
  60. coordinate (6W3) at (22.1mm,38.2mm);
  61.  
  62. coordinate (OE) at (-10,46mm);
  63. coordinate (O3) at (16mm,46mm);
  64. coordinate (OC) at (22.1mm,46mm);
  65.  
  66. end{axis}
  67. node[style={text=white}] at (ES) {S};
  68. node[style={text=white}] at (EM) {M};
  69. node[style={text=white}] at (ET) {T};
  70. node[style={text=white}] at (EH) {H};
  71. node[style={text=white}] at (EA) {A};
  72. node[style={text=white}] at (EO) {O};
  73. node[style={text=white}] at (EP) {P};
  74.  
  75. node[style={text=white}] at (TA) {A};
  76. node[style={text=white}] at (TS) {S};
  77. node[style={text=white}] at (TE) {E};
  78. node[style={text=white}] at (TN) {N};
  79.  
  80. node[style={text=white}] at (MN) {N};
  81. node[style={text=white}] at (MT) {T};
  82. node[style={text=white}] at (MA) {A};
  83. node[style={text=white}] at (MS) {S};
  84.  
  85. node[style={text=white}] at (NM) {M};
  86. node[style={text=white}] at (NA) {A};
  87. node[style={text=white}] at (NH) {H};
  88. node[style={text=white}] at (NT) {T};
  89. node[style={text=white}] at (NY) {Y};
  90.  
  91. node[style={text=white}] at (AE) {E};
  92. node[style={text=white}] at (AN) {N};
  93. node[style={text=white}] at (AM) {M};
  94. node[style={text=white}] at (AP) {P};
  95. node[style={text=white}] at (AT) {T};
  96.  
  97. node[style={text=white}] at (6W7) {7};
  98. node[style={text=white}] at (6W3) {3};
  99.  
  100. node[style={text=white}] at (OE) {E};
  101. node[style={text=white}] at (O3) {3};
  102. node[style={text=white}] at (OC) {C};
  103. end{tikzpicture}
  104. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement