2

I am trying to analyze multiple tcp congestion control algorithm and for that trying to plot multiple graph but i am not able to make one comparative graph.

This is my script code:

gnuplot -persist <<"EOF"
set xlabel "time (seconds)"
set ylabel "Segments (cwnd, ssthresh)"
plot "./cubic.out" using 1:7 title "snd_cwnd cubic", \
 "./cubic.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh cubic",/
  "./reno.out" using 1:7 title "snd_cwnd reno", \
  "./reno.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh reno"
  ,/
EOF

But this script divides graph into two sub-section( both are not originating at origin)

Thanks

3
  • 2
    could you please provide a picture or the data and better explain what you would achieve Commented Apr 17, 2016 at 7:49
  • and some sample data Commented Apr 17, 2016 at 8:07
  • 2
    The forward slashes make your code incorrect. Continuation line breaks require backward slashes. Commented Apr 17, 2016 at 12:15

1 Answer 1

1

Following Miguel advice, here is what you should try (remember to have EOF starting the line, any space before it would make it irrelevant):

gnuplot -persist <<"EOF"
set xlabel "time (seconds)"
set ylabel "Segments (cwnd, ssthresh)"
plot "./cubic.out" using 1:7 title "snd_cwnd cubic", \
 "./cubic.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh cubic", \
  "./reno.out" using 1:7 title "snd_cwnd reno", \
  "./reno.out" using 1:($8>=2147483647 ? 0 : $8) title "snd_ssthresh reno" , \
EOF
Sign up to request clarification or add additional context in comments.

Comments

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.