|
From: Dario S. <san...@gm...> - 2020-02-28 19:56:48
|
Hello, list. I have a large .csv file and I need to plot only 500 of its elements which are towards the end. I would still like to have the x-axis to count the elements starting from 0. I have the following script which generates this error: "all points y value undefined!". It must be a problem with the operation that I perform on $0 because I can plot if I remove the subtraction. Would you please help me understand what I'm doing wrong and, generally, what is the best practice to start counting the elements from zero even when the elements do not start from the zero-position? Thanks, Dario low = 7005000 len = 500 set datafile separator "," set key autotitle columnhead set term postscript eps color font "Times-Roman,12" set output 'zc.eps' set key opaque set y2range[0:1] set xlabel "Samples" set ylabel "Amplitude" set grid lt 0 lc rgb "black" lw 2 set border lw .1 plot[low:(low+len)] ARG1 using ($0-low):2 with points ls 1 lc rgb "blue" lw 1 title "Looped drum sample", "" using ($0-low):3 with impulses lt rgb "red" lw 1 axis x1y2 title "Trigger function" reset |