Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

14 Apr '17, 12:30

cis's gravatar image

cis
9.6k103460491

Möglicherweise ist irgendwie sowas gesucht: ![alt text][1] Eine Zusatzachse kann man mit TikZ-Mitteln in pgfplots reinschmuggeln. \documentclass[margin=20mm]{standalone} %\documentclass{article} \usepackage[ngerman]{babel} \usepackage{pgfplots} \pgfplotsset{compat=1.9} % Grouping the common style settings here to make the code below easier to read \pgfkeys{/pgfplots/AxisStyle/.style={ width=13.5cm, height=5cm, axis x line=center, axis y line=middle, samples=100, ymin=-1, ymax=1.5, xmin=0.0, xmax=7.0, ytick={1}, %enlargelimits, %enlarge x limits=0.05, enlarge x limits={abs value=0.5,lower}, enlarge y limits=0.05, axis line style = {-latex}, xlabel=$\varphi$[rad],xlabel style={anchor=north}, ylabel=$y$[\%],ylabel style={anchor=east}, }} \begin{document} \begin{tikzpicture} \begin{axis}[ AxisStyle, xtick={1.5708, 3.14159, 4.7123889, 6.28318}, xticklabels={$\frac{\pi}{2}$, $\pi$, $\frac{3\pi}{2}$, $2\pi$} ] \addplot [mark=none,thick, domain=0:2*pi] {sin(deg(x))^2}; % Zusatzachse \draw[yshift=-0.75cm, -latex] (axis cs: 0,0) -- (axis cs: 7,0) node[below, xshift=-5pt]{$t$[s]}; % \pgfplotsinvokeforeach{1.5708, 3.14159, 4.7123889, 6.28318}{ \draw [yshift=-0.75cm] (axis cs: #1, 0.07) -- (axis cs: #1,-0.07); } % \foreach \x/\text in {1.5708/$\frac{T}{4}$, 3.14159/$\frac{T}{2}$, 4.7123889/$\frac{3T}{4}$, 6.28318/$T$}{% \edef\temp{% \noexpand \node[yshift=-1.1cm] at (axis cs:\x,-0.07) {\text}; } \temp }% \end{axis} \end{tikzpicture} \end{document} [1]: http://texwelt.de/wissen/upfiles/55555555_62.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

14 Apr '17, 12:29

cis's gravatar image

cis
9.6k103460491

Möglicherweise ist irgendwie sowas gesucht: ![alt text][1] Eine Zusatzachse kann man mit TikZ-Mitteln in pgfplots reinschmuggeln. \documentclass[margin=20mm]{standalone} %\documentclass{article} \usepackage[ngerman]{babel} \usepackage{pgfplots} \pgfplotsset{compat=1.9} % Grouping the common style settings here to make the code below easier to read \pgfkeys{/pgfplots/AxisStyle/.style={ width=13.5cm, height=5cm, axis x line=center, axis y line=middle, samples=100, ymin=-1, ymax=1.5, xmin=0.0, xmax=7.0, ytick={1}, %enlargelimits, %enlarge x limits=0.05, enlarge x limits={abs value=0.5,lower}, enlarge y limits=0.05, axis line style = {-latex}, xlabel=$\varphi$[rad],xlabel style={anchor=north}, ylabel=$y$[\%],ylabel style={anchor=east}, }} \begin{document} \begin{tikzpicture} \begin{axis}[ AxisStyle, xtick={1.5708, 3.14159, 4.7123889, 6.28318}, xticklabels={$\frac{\pi}{2}$, $\pi$, $\frac{3\pi}{2}$, $2\pi$} ] \addplot [mark=none,thick, domain=0:2*pi] {sin(deg(x))^2}; % Zusatzachse \draw[yshift=-0.75cm, -latex] (axis cs: 0,0) -- (axis cs: 7,0) node[below, xshift=-5pt]{$t$[s]}; % \pgfplotsinvokeforeach{1.5708, 3.14159, 4.7123889, 6.28318}{ \draw [yshift=-0.75cm] (axis cs: #1, 0.07) -- (axis cs: #1,-0.07); } % \foreach \x/\text in {1.5708/$\frac{T}{4}$, 3.14159/$\frac{T}{2}$, 4.7123889/$\frac{3T}{4}$, 6.28318/$T$}{% \edef\temp{% \noexpand \node[yshift=-1.1cm] at (axis cs:\x,-0.07) {\text}; } \temp }% \end{axis} \end{tikzpicture} \end{document} [1]: http://texwelt.de/wissen/upfiles/55555555_62.png