topology-sinx.tex 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{2mm}
  4. \usepackage{pgfplots}
  5. \pgfplotsset{compat=1.9}
  6. \usepackage{tikz}
  7. \usetikzlibrary{arrows, positioning, calc}
  8. \begin{document}
  9. \begin{preview}
  10. \begin{tikzpicture}
  11. \begin{axis}[
  12. axis x line=middle,
  13. axis y line=left,
  14. enlarge y limits=true,
  15. xmode=log, % Logarithmic x axis
  16. xmin=0.01, xmax=1, % Positive domain...
  17. xticklabel=\pgfmathparse{exp(\tick)}\pgfmathprintnumber{\pgfmathresult},
  18. xticklabel style={/pgf/number format/.cd,fixed}, % Use fixed point notation
  19. width=15cm, height=8cm, % size of the image
  20. grid = major,
  21. grid style={dashed, gray!30},
  22. ymin=-1, % start the diagram at this y-coordinate
  23. ymax= 1, % end the diagram at this y-coordinate
  24. axis background/.style={fill=white},
  25. ylabel=$Y$,
  26. xlabel=$X$,
  27. legend style={at={(0.9,0.95)}, anchor=north}
  28. ]
  29. \addplot[domain=0.0105:1, red, thick,samples=2000] {-sin(deg(1/(x)))};
  30. \addplot[domain=0.0105:0.011, blue, thick,samples=20] {10};
  31. \addlegendentry{$\{(x, \sin(\frac{1}{x})) \in X \times Y\}$}
  32. \addlegendentry{$(-1,1) \subseteq Y$}
  33. \end{axis}
  34. \draw[ultra thick,blue] (0,0.5) -- (0,5.9);
  35. \end{tikzpicture}
  36. \end{preview}
  37. \end{document}