Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. documentclass[a4paper,12pt]{article}
  2. usepackage{pgfplots,filecontents}
  3.  
  4. begin{filecontents*}{data.csv}
  5. "Amplitude","notes: data set 1",
  6. X,Y,
  7. 1,1,
  8. 2,2,
  9. 3,3,
  10. 4,4,
  11.  
  12. "CH1","notes: data set 1",
  13. end{filecontents*}
  14.  
  15. begin{document}
  16. begin{tikzpicture}
  17. begin{axis}
  18. addplot gnuplot [raw gnuplot, mark=none, black]{
  19. set datafile separator comma;
  20. plot "data.csv" using 1:2 every ::2::5 with lines;
  21. };
  22. end{axis}
  23. end{tikzpicture}
  24. end{document}
  25.  
  26. documentclass[a4paper,12pt]{article}
  27. usepackage{pgfplots,filecontents}
  28.  
  29. begin{filecontents*}{data.csv}
  30. "Amplitude","notes: data set 1",
  31. X,Y,
  32. 1,1,
  33. 2,2,
  34. 3,3,
  35. 4,4,
  36.  
  37. "Amplitude","notes: data set 2",
  38. X,Y,
  39. 1,7,
  40. 2,6,
  41. 3,5,
  42. 4,4,
  43. 5,3,
  44. 6,2,
  45. 7,1,
  46.  
  47. "CH1","notes: data set 1",
  48. "CH1","notes: data set 2",
  49. end{filecontents*}
  50.  
  51. begin{document}
  52. begin{tikzpicture}
  53. begin{axis} [width=0.5textwidth,height=7cm,
  54. ]
  55. addplot gnuplot [raw gnuplot, mark=none, black]{
  56. set datafile separator comma;
  57. plot "data.csv" using 1:2 every ::2::5 with lines;
  58. };
  59. end{axis}
  60. end{tikzpicture}
  61. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement