2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/topology-sinx/topology-sinx.tex

41 lines
1.3 KiB
TeX
Raw Normal View History

2013-11-09 00:40:53 +01:00
\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
\usepackage{tikz}
\usetikzlibrary{arrows, positioning, calc}
\begin{document}
\begin{preview}
\begin{tikzpicture}
\begin{axis}[
axis x line=middle,
axis y line=left,
enlarge y limits=true,
xmode=log, % Logarithmic x axis
xmin=0.01, xmax=1, % Positive domain...
xticklabel=\pgfmathparse{exp(\tick)}\pgfmathprintnumber{\pgfmathresult},
xticklabel style={/pgf/number format/.cd,fixed}, % Use fixed point notation
width=15cm, height=8cm, % size of the image
grid = major,
grid style={dashed, gray!30},
ymin=-1, % start the diagram at this y-coordinate
ymax= 1, % end the diagram at this y-coordinate
axis background/.style={fill=white},
ylabel=$Y$,
xlabel=$X$,
legend style={at={(0.9,0.95)}, anchor=north}
]
\addplot[domain=0.0105:1, red, thick,samples=2000] {-sin(deg(1/(x)))};
\addplot[domain=0.0105:0.011, blue, thick,samples=20] {10};
\addlegendentry{$\{(x, \sin(\frac{1}{x})) \in X \times Y\}$}
\addlegendentry{$(-1,1) \subseteq Y$}
\end{axis}
2013-11-09 00:40:53 +01:00
\draw[ultra thick,blue] (0,0.5) -- (0,5.9);
\end{tikzpicture}
\end{preview}
\end{document}