I have a large amount of measured data, that I would like to plot. Data are organized into three columns where the first column provides a frequency, the second and third column are values measured at this frequency, like this:
1000019.25 0.007299716 -0.46983397
746474.438 0.004848992 -0.33711791
557226.438 0.005053654 -0.244117826
I would like to plot column three over column two in my plot.
After every 64 rows, a new set of data starts which should be plotted in another graph in the same diagram.
I found the "select coords between"-option, but am only receiving an empty plot. Here's my example:
\begin{tikzpicture}
\pgfplotsset{select coords between index/.style 2 args={
x filter/.code={
\ifnum\coordindex<#1\def\pgfmathresult{}\fi
\ifnum\coordindex>#2\def\pgfmathresult{}\fi
}
}}
\begin{axis}[
]
\pgfplotstableread{pictures/data.txt} \datatable
\addplot table [x index = 1 , y index = 2, select coords between index={0}{63}] from \datatable;
\end{axis}
\end{tikzpicture}
This works so far if I manually select the lines. However, I was wondering if there is a way to add some kind of loop that automatically takes the first n rows for the first graph, the next n rows for the second etc. and also iterates the legend entries.
\documentclass, and including enough example data to reproduce the problem)? – Jake Oct 14 '15 at 21:51@<username>If you're still wondering about that, please edit your question to concern the looping. – Torbjørn T. Nov 07 '15 at 22:05