topology-sinx.tex 1.1 KB

123456789101112131415161718192021222324252627
  1. \begin{tikzpicture}
  2. \begin{axis}[
  3. axis x line=middle,
  4. axis y line=left,
  5. enlarge y limits=true,
  6. xmode=log, % Logarithmic x axis
  7. xmin=0.01, xmax=1, % Positive domain...
  8. xticklabel=\pgfmathparse{exp(\tick)}\pgfmathprintnumber{\pgfmathresult},
  9. xticklabel style={/pgf/number format/.cd,fixed}, % Use fixed point notation
  10. width=8cm, height=6cm, % size of the image
  11. grid = major,
  12. grid style={dashed, gray!30},
  13. ymin=-1, % start the diagram at this y-coordinate
  14. ymax= 1, % end the diagram at this y-coordinate
  15. axis background/.style={fill=white},
  16. ylabel=$Y$,
  17. xlabel=$X$,
  18. legend style={at={(0.9,0.95)}, anchor=north}
  19. ]
  20. \addplot[domain=0.0105:1, red, thick,samples=2000] {-sin(deg(1/(x)))};
  21. \addplot[domain=0.0105:0.011, blue, thick,samples=20] {10};
  22. \addlegendentry{$\{(x, \sin(\frac{1}{x})) \in X \times Y\}$}
  23. \addlegendentry{$(-1,1) \subseteq Y$}
  24. \end{axis}
  25. \draw[ultra thick,blue] (0,0.5) -- (0,4);
  26. \end{tikzpicture}