0

I am running ubuntu and in gnuplot, when I execute plot "<(awk '...' data.txt)" part of this command is drawn into the middle of the graph of data. The graph itself is correct, the problem is the text of the command that remains in the output. I could't find anything about other people experiencing residues like this. Does anyone have any idea where to problem might be or where to look for solution?

Code:

plot '<(awk "BEGIN{x=0} /^#previous/ {x++} /^#[^p]/ {x=0} /^[^m#]/ {if(x) print}" ./data.txt)' using 2:3

Source data:

#current                
month   followed    retweeted   mentioned   replied
Jan 395 29  35  28
Feb 380 28  32  31


#previous               
month   followed    retweeted   mentioned   replied
Jan 381 30  38  32
Feb 378 25  42  30
Mar 374 28  46  40
Apr 372 29  40  35
May 371 28  35  25
Jun 371 31  37  30
Jul 370 30  34  28
Aug 372 30  35  30
Sep 376 27  35  33
Oct 379 29  42  37
Nov 387 31  40  35
Dec 385 29  33  25

Output: enter image description here

2
  • 1
    How about adding the code used, the input file, and the graph showing the issue? I doubt you will get any help with the question in the current form. Commented Apr 17, 2013 at 11:38
  • Great, easily solved with all the information. Commented Apr 17, 2013 at 13:36

1 Answer 1

2

Use notitle to fix this issue:

plot '< awk "/^#previous/{x=1}/^#[^p]/{x=0}/^[^m#]/&&x" data.txt' u 2:3 notitle
Sign up to request clarification or add additional context in comments.

1 Comment

@Damell -- Alternatively, you could attach a meaningful title in the legend using title "something meaningful" if you wanted.

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.