Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % !TeX TXS-program:compile = txs:///pdflatex/[--shell-escape]
- documentclass[a4paper,12pt]{article}
- usepackage{pgfplots,filecontents}
- begin{filecontents*}{data.csv}
- "Amplitude","notes: data set 1",
- X,Y,
- 1,1,
- 2,2,
- 3,3,
- 4,4,
- "Amplitude","notes: data set 2",
- X,Y,
- 1,7,
- 2,6,
- 3,5,
- 4,4,
- 5,3,
- 6,2,
- 7,1,
- "CH1","notes: data set 1",
- "CH1","notes: data set 2",
- end{filecontents*}
- begin{document}
- begin{tikzpicture}
- begin{axis} [width=0.5textwidth,height=7cm,
- ]
- addplot gnuplot [raw gnuplot, mark=none, black]{
- set datafile separator comma;
- plot "<(sed -n '3,6p' data.csv)" using 1:2 with lines;
- };
- addplot gnuplot [raw gnuplot, mark=none, red]{
- set datafile separator comma;
- plot "<(sed -n '10,16p' data.csv)" using 1:2 with lines;
- };
- end{axis}
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement