topology-1.tex 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{patterns}
  4. \usepackage{pgfplots}
  5. \pgfplotsset{compat=1.7}
  6. \begin{document}
  7. \begin{tikzpicture}
  8. \begin{axis}[
  9. axis x line=none,
  10. axis y line=none,
  11. %width=9cm,
  12. %height=4.5cm,
  13. xmin= 0, % start the diagram at this x-coordinate
  14. xmax= 5, % end the diagram at this x-coordinate
  15. ymin= 0, % start the diagram at this y-coordinate
  16. ymax= 5, % end the diagram at this y-coordinate
  17. xlabel=$Y$,
  18. ylabel=$X$,
  19. ticks=none,
  20. enlargelimits=true]
  21. \addplot[mark=none, red, smooth cycle, thick, fill=red!30] coordinates {(0,0) (2,0.2) (3,1.5) (3,2) (3.5,3) (3.2, 5) (2.2, 4.7) (1.5, 4.2) (1.1, 3.9) (0.2, 2.5)};
  22. \node[red] at (axis cs:4,4) [anchor=south] {$X_i$};
  23. % Draw solid square
  24. \addplot[mark=none, thick] coordinates {(1.5,2.0) (2.5,2.0) (2.5,3.6) (1.5,3.6) (1.5,2.0)};
  25. \node at (axis cs:2.7,3.2) [anchor=90] {$K$};
  26. % Draw x and annotation
  27. \node at (axis cs:1.8,3.2) [anchor=-90] {$x$};
  28. \draw (axis cs:1.8,3.2) circle[radius=0.6];
  29. \addplot[mark=*] coordinates {(1.8,3.2)};
  30. \node at (axis cs:0.8,1.2) [anchor=-90] {$y$};
  31. \draw (axis cs:0.8,1.2) circle[radius=0.6];
  32. \addplot[mark=*] coordinates {(0.8,1.2)};
  33. \end{axis}
  34. \end{tikzpicture}
  35. \end{document}