Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1. begin{landscape}
  2. % Define block styles
  3. tikzset{
  4. desicion/.style={
  5. diamond,
  6. draw, thick,
  7. text width=4em,
  8. text badly centered,
  9. inner sep=0pt
  10. },
  11. block/.style={
  12. rectangle,
  13. draw, thick,
  14. text width=10em,
  15. text centered,
  16. rounded corners
  17. },
  18. cloud/.style={
  19. draw,
  20. ellipse,
  21. minimum height=2em
  22. },
  23. descr/.style={
  24. fill=white,
  25. inner sep=5pt
  26. },
  27. connector/.style={
  28. -latex,
  29. font=scriptsize
  30. },
  31. rectangle connector/.style={
  32. connector,
  33. to path={(tikztostart) -- ++(#1,0pt) tikztonodes |- (tikztotarget) },
  34. pos=0.5
  35. },
  36. rectangle connector/.default=-2cm,
  37. straight connector/.style={
  38. connector,
  39. to path=--(tikztotarget) tikztonodes
  40. },
  41. line/.style={>=latex,->,thick}
  42. }
  43.  
  44.  
  45. begin{figure}[htpb]
  46. tikzset{font=large,
  47. edge from parent fork down,
  48. level distance=40pt,
  49. edge from parent/.style=
  50. {draw=blue!50,
  51. thick
  52. },
  53. filling/.style=
  54. {minimum height=12mm,
  55. draw=myfilling!75!black,
  56. very thick,
  57. drop shadow,
  58. rectangle,rounded corners,
  59. fill=myfilling,
  60. },
  61. ntext/.style=
  62. {draw=none,
  63. text width=4cm,
  64. align=center
  65. },
  66. }
  67.  
  68. centering
  69. begin{tikzpicture}
  70. begin{scope}[
  71. every node/.style=
  72. {top color=white,
  73. bottom color=blue!25,
  74. rectangle,rounded corners,
  75. minimum height=8mm,
  76. draw=blue!25,
  77. very thick,
  78. drop shadow,
  79. align=center,
  80. text depth = 0pt
  81. },
  82. ]
  83. Tree [.node (p) {Tank Overfill Event};
  84. [.node (o) {one};
  85. [.node (1) {one1};
  86. [.node (11) {one11};
  87. [.node (111) {one111};
  88. [.node (a11) {one1111};
  89. [.node (s) {ones};
  90. [.node (s1) {ones1};
  91. [.node (s11) {ones11};
  92. [.node (s111) {ones111};
  93. [.ones1111
  94. ]
  95. ] ]
  96. ]
  97. ]
  98. [.twos
  99. [.twos1
  100. [.twos11
  101. [.twos111 node (s1111) {twos1111};] ] ]
  102. [.twos2 [.twos21
  103. [.twos211 node (s2111) {twos2111};] ]
  104. [.twos22 [.twos221 node (s2211) {twos2211}; ]
  105. ] ]
  106. ]
  107. ]
  108. ]
  109. ] ]
  110. ]
  111. ]
  112. [.node (two) {two};
  113. [.node (two1) {two1};
  114. [.node (two11) {two11};
  115. [.node (two111) {two111};
  116. node (1111) {two1111};] ] ]
  117. [.node (two2) {two2};
  118. [.node (two21) {two21};
  119. [.node (two211) {two211}; node (2111) {two2111};] ]
  120. [.node (two22) {two22};
  121. [.node (two221) {two221}; node (2211) {two2211}; ]
  122. ] ] ]
  123. ]
  124. end{scope}
  125. % auxuliary constructs for level 4
  126. node[left=of 111,ntext]
  127. (text4) {Level 4 text};
  128. coordinate (aux2) at ([xshift=5pt]s2211.east|-text4);
  129. % auxuliary constructs for level 3
  130. node[ntext] at (text4|-11)
  131. (text3) {Level 3 text};
  132. coordinate (aux4) at ([xshift=5pt]s2211.east|-11);
  133. % auxuliary constructs for level 2
  134. node[ntext] at (text4|-1)
  135. (text2) {Level 2 text};
  136. coordinate (aux6) at ([xshift=5pt]s2211.east|-1);
  137. % auxuliary constructs for level 1
  138. node[ntext] at (text4|-o)
  139. (text1) {Level 1 text};
  140. coordinate (aux8) at ([xshift=5pt]s2211.east|-o);
  141. % auxuliary constructs for level 0
  142. node[ntext] at (text4|-p)
  143. (text0) {Tank Overfill Event (A)};
  144. coordinate (aux10) at ([xshift=5pt]s2211.east|-p);
  145. % auxuliary constructs for level 5
  146. node[ntext] at (text4|-a11)
  147. (text5) {Level 5 text};
  148. coordinate (aux12) at ([xshift=5pt]s2211.east|-a11);
  149. % auxuliary constructs for level 6
  150. node[ntext] at (text4|-s)
  151. (text6) {Level 6 text};
  152. coordinate (aux14) at ([xshift=5pt]s2211.east|-s);
  153. % auxuliary constructs for level 7
  154. node[ntext] at (text4|-s1)
  155. (text7) {Level 7 text};
  156. coordinate (aux16) at ([xshift=5pt]s2211.east|-s1);
  157. % auxuliary constructs for level 8
  158. node[ntext] at (text4|-s11)
  159. (text8) {Level 8 text};
  160. coordinate (aux18) at ([xshift=5pt]s2211.east|-s11);
  161. % auxuliary constructs for level 9
  162. node[ntext] at (text4|-s111)
  163. (text9) {Level 9 text};
  164. coordinate (aux20) at ([xshift=5pt]s2211.east|-s111);
  165. % auxuliary constructs for level 10
  166. node[ntext] at (text4|-s1111)
  167. (text10) {Level 10 text};
  168. coordinate (aux22) at ([xshift=5pt]s2211.east|-s1111);
  169.  
  170. begin{pgfonlayer}{background}
  171. node[filling,fit=(text4) (aux2)] {};
  172. node[filling,fit=(text3) (aux4)] {};
  173. node[filling,fit=(text2) (aux6)] {};
  174. node[filling,fit=(text1) (aux8)] {};
  175. node[filling,fit=(text0) (aux10)] {};
  176. node[filling,fit=(text5) (aux12)] {};
  177. node[filling,fit=(text6) (aux14)] {};
  178. node[filling,fit=(text7) (aux16)] {};
  179. node[filling,fit=(text8) (aux18)] {};
  180. node[filling,fit=(text9) (aux20)] {};
  181. node[filling,fit=(text10) (aux22)] {};
  182. end{pgfonlayer}
  183. end{tikzpicture}
  184. caption{The alarms Event Tree}
  185. end{figure}
  186. end{landscape}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement