neighbourhood-topology-open.tex 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. \begin{tikzpicture}
  2. \begin{axis}[
  3. axis x line=middle,
  4. axis y line=middle,
  5. %width=9cm,
  6. %height=4.5cm,
  7. xmin=-1, % start the diagram at this x-coordinate
  8. xmax= 5, % end the diagram at this x-coordinate
  9. ymin=-1, % start the diagram at this y-coordinate
  10. ymax= 5, % end the diagram at this y-coordinate
  11. xlabel=$Y$,
  12. ylabel=$X$,
  13. ticks=none,
  14. enlargelimits=true,
  15. after end axis/.code={
  16. \draw [decorate,decoration={brace,mirror,raise=15pt}, orange] (axis cs:0,3.6) -- (axis cs:0,2.5) node [midway,left=20pt,orange] {$V_{x,y}$};
  17. \draw [decorate,decoration={brace,mirror,raise=12pt}, green] (axis cs:1.5,0) -- (axis cs:2.5,0) node [midway,below=16pt,green] {$U_{x,y}$};
  18. }]
  19. \addplot[mark=none, red, smooth cycle, thick, fill=red!30] coordinates {(1,1) (2,0.5) (3,1.5) (3,2) (3.5,3) (3.2, 5) (2.2, 4.7) (1.5, 4.2) (1.1, 3.9) (0.9, 2.5)};
  20. \node[red] at (axis cs:4,4) [anchor=south] {$W_i$};
  21. % Draw help lines
  22. %\addplot[dashed] coordinates {(1.5,0) (1.5,3.6)};
  23. %\addplot[dashed] coordinates {(2.5,0) (2.5,3.6)};
  24. %\addplot[dashed] coordinates {(0,2.5) (2.5,2.5)};
  25. %\addplot[dashed] coordinates {(0,3.6) (2.5,3.6)};
  26. % Draw solid square
  27. \addplot[mark=none, orange, thick] coordinates {(2.5,2.5) (2.5,3.6)};
  28. \addplot[mark=none, green, thick] coordinates {(2.5,3.6) (1.5,3.6)};
  29. \addplot[mark=none, orange, thick] coordinates {(1.5,3.6) (1.5,2.5)};
  30. \addplot[mark=none, green, thick] coordinates {(1.5,2.5) (2.5,2.5)};
  31. \addplot[mark=none, orange, thick] coordinates {(3.0,1.5) (3.0,2.6)};
  32. \addplot[mark=none, green, thick] coordinates {(3.0,2.6) (1.1,2.6)};
  33. \addplot[mark=none, orange, thick] coordinates {(1.1,1.5) (1.1,2.6)};
  34. \addplot[mark=none, green, thick] coordinates {(1.1,1.5) (3.0,1.5)};
  35. \addplot[mark=none, orange, thick] coordinates {(3.0,1.5) (3.0,2.6)};
  36. \addplot[mark=none, green, thick] coordinates {(3.0,2.6) (1.1,2.6)};
  37. \addplot[mark=none, orange, thick] coordinates {(1.1,1.5) (1.1,2.6)};
  38. \addplot[mark=none, green, thick] coordinates {(1.1,1.5) (3.0,1.5)};
  39. \addplot[mark=none, blue, thick, dashed] coordinates {((1.8,0) (1.8,5)};
  40. \addplot[mark=none, blue, thick, dashed] coordinates {((2.2,0) (2.2,5)};
  41. % Draw x and annotation
  42. \node at (axis cs:2,3) [anchor=-90] {$x$};
  43. \addplot[mark=*] coordinates {(2,3)};
  44. % Draw ticks of help lines
  45. \addplot[mark=none, green, thick] coordinates {(1.5, -0.1) (1.5,0.1)};
  46. \addplot[mark=none, green, thick] coordinates {(2.5, -0.1) (2.5,0.1)};
  47. \addplot[mark=none, green, thick] coordinates {(1.5, 0) (2.5,0)};
  48. \addplot[mark=none, orange, thick] coordinates {(-0.1, 2.5) (0.1,2.5)};
  49. \addplot[mark=none, orange, thick] coordinates {(-0.1, 3.6) (0.1,3.6)};
  50. \addplot[mark=none, orange, thick] coordinates {(0, 2.5) (0,3.6)};
  51. % Draw axis text
  52. \node at (axis cs:0,3) [anchor=east] {$y$};
  53. \node at (axis cs:2,0) [anchor=north] {$x$};
  54. \end{axis}
  55. \end{tikzpicture}