0

I have the data in the following format

+CMT: "+944434556","","17/06/20,13:51:21+22" Level 255mm

And I want to plot a graphic between time on x axis and 255 on y axis. Can you please let me know the code for the above?

3
  • To help me understand better, can you show more lines of your data file ? What part of the time do you want to display in the x-axis (hours, date, +944434556,...)? Commented Jun 22, 2017 at 7:32
  • from this +CMT: "+944434556","","17/06/20,13:51:21+22" Level 255mm, i want 13:51:21 on x axis and 255 on y axis. Commented Jun 23, 2017 at 6:56
  • I am getting data in this format +CMT: "+944434556","","17/06/20,13:51:21+22" Level 255mm coninuously from sim cards. Now i have to plot a graph between time 13:51:21 on x axis and 255 on y axis Commented Jun 23, 2017 at 6:59

1 Answer 1

0

This is what I think you want :

plot "<awk -F'[, +m\"]' '{print $5, $16, $12}' datafile.dat" u 1:2:xtic(3) notitle

where datafile.dat contains your data.

In order to find the location on the x-axis, I assumed that 944434556 also represent the time. So the point is in reality set at (944434556,255) but the plot displays 13:51:21. Of course, you could also do :

plot "<awk -F'[, +m\"]' '{print $16, $12}' datafile.dat" u 1:xtic(2) notitle
Sign up to request clarification or add additional context in comments.

3 Comments

when i am trying to run the above code i am getting an error cannot create pipe for data
does awk -F'[, +m\"]' '{print $5, $16, $12}' datafile.dat work for you ? (simply run this in a terminal where datafile.dat is located)
No its not working. It is throwing an error undefined variable: awk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.