1

I have created a gnu plot control file (.plt) with number of nodes 40 to 80 with gap of 10 and last value as 84. when I generate output I don't get value 84 shown in xtics. I want values from 40 to 80 as shown in figure and want to display 84 also. Here is my gnuplot control file

set terminal pngcairo size 640,480 
 set output 'test2.png' 
 set logscale y 2 
 set xlabel 'Number of Nodes'  
 set ylabel 'Average Number of Collisions' 
 set key left top 
 set xrange [36:92] 
 set grid xtics 
 set grid ytics 
 set xtics center offset 0,0 
 set tics font ', 12'  
 set font ', 12'  
plot '-'  title 'test2' pt 4 lc rgb 'black'  dt 4 with yerrorlines 
40 600.600000 440.2
50 1800.400000 488.4
60 3000.000000 1200.0
70 500.200000 370.0
80 400.600000 460.0
84 15600.000000 20000.0
e

and the output I get is like this enter image description here

1

Call xtic() on column 1 as an extra column in the data:

plot '-' using 1:2:3:xtic(1) title 'test2' pt 4 lc rgb 'black'  dt 4 with yerrorlines 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.