2

I have a large file with data which I want to plot using pgf. Since I don't want to edit the file and it consists of roughly 5000 data points, compiling takes quite a while. Is there any way to tell pgfplots to plot only every n-th data point?

Here is an example:

\documentclass{article}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{filecontents*}{mydata.csv}
x,       y
1,       0.000004824
2,       0.000004687
3,       0.000009425
4,       0.000004794
5,       0.000004565
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
\begin{axis}[]
\addplot table [col sep=comma] {mydata.csv};
\end{axis}
\end{tikzpicture}
\end{document}
Karlo
  • 3,257
bonanza
  • 2,141
  • 2
  • 26
  • 37

0 Answers0