How to make this gnuplot chart

This is my gnuplot dynamometer. My digram:

enter image description here

I want to create this:

enter image description here

  • From every point on the line. create a line for X and Y:
  • Change the color of the dots to something other than red.

This is my plot script:

set terminal png size 900,600 enhanced font "Helvetica,20" 
set output 'All recived Packet in the network per second.png'
set grid
set xlabel "Transmision Range"
set ylabel "All of recived Packet in the network per second"
set title "Recive Packet pre second"
plot  "NumOfRcvPkt.dat" using 2:3 title 'Transmision Range' with  linespoints

It also contains the NumOfRcvPkt.dat file:

0 15 124
1 20 105
2 25 82
+4
source share
1 answer

This is achieved as follows:

xmin=14 ; ymin=80
set xrange [xmin:*] ; set yrange [ymin:*]
plot "data" u 2:3 w l lc rgb "red", \
"" u 2:3 w p pt 7 lc rgb "blue", \
"" u (xmin):3:($2-xmin):(0) w vectors nohead lt 2 lc rgb "black", \
"" u 2:(ymin):(0):($3-ymin) w vectors nohead lt 2 lc rgb "black"

The first two lines specify the ranges. This is important because you need to know where the edges lie in order to draw black dashed lines.

plot , , - , - . , ( lt 2), dashed, . set term png dashed.

:

enter image description here

+4

All Articles