ich habe folgendes Problem: Ich möchte zwei Messreihen darstellen (rot und blau). Beide fangen aber nicht bei Null an (y-Achse). Jetzt würde ich gerne jeweils die ersten 25 Messwerte nehmen, von diesen den Durschnitt berechnen und diesen Wert anschließden von allen Messpunkten abziehen. Das würde dazu führen, dass meine Messreihen immer bei Null beginnen.
Hier ist mal mein Code:
\begin{tikzpicture} \pgfplotsset{every axis plot post/.append style={mark=none, line width=2.5pt}, every axis legend/.append style={at={(0.14,0.7)},anchor=south}, legend cell align={left}} \begin{axis}[ymin=0, ymax=1400, xmin=0, xmax=210, axis y line*=right, axis x line=none, height=8cm, width=.85\textwidth, ylabel=Temperatur in °C, y label style={at={(axis description cs:1.1,0.5)},rotate=180, anchor=south},tick label style={/pgf/number format/1000 sep=}] \addplot[color=black,mark=*,dashed] table [x index=0, y index=1, col sep=space] {52.txt}; \label{plot_Temperatur} \addlegendentry{Temperatur} \end{axis} \begin{axis}[clip=false, ymin=0, xmin=0, xmax=210, height=8cm, width=.85\textwidth, axis y line*=left, xlabel=Zeit in min, ylabel=Ionenstrom in $\mathrm{\frac{A}{mg}}$, tick label style={/pgf/number format/use comma}] \node[left] at (axis description cs:0.99,0.9) {$\mathrm{H_2S}$}; \addlegendimage{/pgfplots/refstyle=plot_Temperatur}\addlegendentry{Temperatur} \addplot[blue, smooth, tension=1] table [x index=0, y index=26, col sep=space] {52.txt}; \addlegendentry{plot 1} \addplot+[red, smooth, tension=1] table [x index=0, y index=26, col sep=space] {53.txt}; \addlegendentry{plot 2} \end{axis} \end{tikzpicture}