Hallo, ich habe folgenden Plot: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} \begin{document} \begin{tikzpicture} \begin{axis}[ minor tick num=3, axis y line=left, axis x line=middle, xlabel=$x$,ylabel=$y$, xmin=-4.7124, xmax=4.7124, xtick={-4.7124,-1.5708,...,10}, xticklabels={$\pi$}, grid=major ] \addplot[smooth,blue,mark=none, domain=-5:5,samples=40] {sin(deg(x))}; \end{axis} \end{tikzpicture} \end{document} Leider passt obiges Schaubild noch nicht ganz:
gefragt 01 Mär '22, 22:01 runix |
Eine Möglichkeit: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} \begin{document} \begin{tikzpicture} \begin{axis}[ minor tick num=3, axis x line=middle, axis y line=left, every axis y label/.style={at={(current axis.north west)},anchor=north east}, xlabel=$x$,ylabel=$y$, xmin={-3/2*pi}, xmax={3/2*pi}, xtick={{-3/2*pi},{-pi},...,10}, xticklabels={$-\frac{3}{2}\pi$, $-\pi$,$-\frac{1}{2}\pi$,0,$\frac{1}{2}\pi$,$\pi$,$\frac{3}{2}\pi$}, typeset ticklabels with strut, grid=major ] \addplot[smooth,blue,mark=none, domain={-3/2*pi}:{3/2*pi},samples=40] {sin(deg(x))}; \end{axis} \end{tikzpicture} \end{document} beantwortet 02 Mär '22, 16:21 esdd |