Hy
I wonder when I working with same code, but the data is only 1 data / 1 second - the code is working,
But when I change the sensor sample rate to about 30 Hz , so 30 data / 1 second I get this plot: http://i.imgur.com/Wn2fbne.jpg
set term pngset autoscale yfixset autoscale xfix set grid#set offsets 0,0,30,30#set offsets 0,0,30,30set offsets graph 0, 0, 50, 50PATCH = system("cat ./outputs/lastPatch.txt")set title "MPU-9150 IMU sensor: RAW Accelerometer "set xdata timeset timefmt '%H:%M:%S'set format x '%H:%M:%S'set xtics rotateset xlabel "[time]"set ylabel "[-]"#set output "./outputs/IMUrawAccel.png"set output sprintf("%sIMUrawAccel.png",PATCH)#plot './outputs/IMUrawAccel.txt' using 1:2 title 'X' with lines, './outputs/IMUrawAccel.txt' using 1:3 title 'Y' with lines , './outputs/IMUrawAccel.txt' using 1:4 title 'Z' with lines plot sprintf("%sIMUrawAccel.txt",PATCH) using 1:2 title 'X' with lines, sprintf("%sIMUrawAccel.txt",PATCH) using 1:3 title 'Y' with lines , sprintf("%sIMUrawAccel.txt",PATCH) using 1:4 title 'Z' with lines
And the output of the sensor is this (what I use in gnuplot)
I believe the problem is in this line. You are telling gnuplot that the
time is formatted as hours:minute:second. If it is true,. for 1Hz sampling
it works fine because you have one reading per second, but anything more
that that will make 2 or more data points fall on the same time coordinate.
Edo
--
Edo
I know you think you understand what you thought I said, but I'm not sure
you realize that what you heard is not what I meant (prob. Alan Greenspan)
:wq
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Believe it or not, but the plot you got is 100% correct for the data and commands you gave gnuplot to display.
You asked for a line connecting all the datapoints, but you have 30 datapoints in sequence at the same x coordinate. What other than a vertical line (multiply overpainted) did you expect to get from that?
If you want a different plot, you'll have to tell gnuplot what else it's supposed to do. I think you're looking for "help smooth unique".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also have a problem with the time format. I use the following action. I have two columns with the time information. Colum 1 with the date and Colum 2 with the time. The separator between the columns is a "". I'm trying to get GNUplot reading column 1 & 2 as a colum. But it does not work. I get no warning, but the diagram has only points left and right frame.
A note: we would usually prefer that you start your own discussion instead of hijacking someone else's...
The separator between the columns is a "".
Not really. It's either a comma, or a double quote, then a comma, then another double quote, depending on which way one looks it.
gnulot won't just ignore all those " characters while trying to read numeric input (including timefmt data), so you'll have to put those into all your input formats --- or convince the application that created this file not to enclose numeric data as if they were strings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hy
I wonder when I working with same code, but the data is only 1 data / 1 second - the code is working,
But when I change the sensor sample rate to about 30 Hz , so 30 data / 1 second I get this plot:
http://i.imgur.com/Wn2fbne.jpg
I want to something like this:
http://i.imgur.com/GZg5oef.jpg
the code what i use is this:
And the output of the sensor is this (what I use in gnuplot)
Last edit: artiny sixtee 2017-04-17
On Mon, Apr 17, 2017 at 9:40 AM, artiny sixtee artiny@users.sf.net wrote:
I believe the problem is in this line. You are telling gnuplot that the
time is formatted as hours:minute:second. If it is true,. for 1Hz sampling
it works fine because you have one reading per second, but anything more
that that will make 2 or more data points fall on the same time coordinate.
Edo
--
Edo
I know you think you understand what you thought I said, but I'm not sure
you realize that what you heard is not what I meant (prob. Alan Greenspan)
:wq
Believe it or not, but the plot you got is 100% correct for the data and commands you gave gnuplot to display.
You asked for a line connecting all the datapoints, but you have 30 datapoints in sequence at the same x coordinate. What other than a vertical line (multiply overpainted) did you expect to get from that?
If you want a different plot, you'll have to tell gnuplot what else it's supposed to do. I think you're looking for "help smooth unique".
Hallo,
I also have a problem with the time format. I use the following action. I have two columns with the time information. Colum 1 with the date and Colum 2 with the time. The separator between the columns is a "". I'm trying to get GNUplot reading column 1 & 2 as a colum. But it does not work. I get no warning, but the diagram has only points left and right frame.
"Date","Time","Alarm 1",....
"28/02/17","23:58:10"," 0",....
"28/02/17","23:58:11"," 0",....
A note: we would usually prefer that you start your own discussion instead of hijacking someone else's...
Not really. It's either a comma, or a double quote, then a comma, then another double quote, depending on which way one looks it.
gnulot won't just ignore all those
"characters while trying to read numeric input (including timefmt data), so you'll have to put those into all your input formats --- or convince the application that created this file not to enclose numeric data as if they were strings.I´m sorry about that hijacking. Next time I open my own thread.
The separator is a ,
If I create a plot without time (e.g. rpm), it works fine. So I think gnuplot ignore it. The files already excist and I can´t delet the double qoutes.
I have it
"%d/%m/%y,%h:%m:%s" => "%d/%m/%y\",\"%h:%m:%s"
and it works!