tags:

views:

163

answers:

1

Dear Guys,

I have used the following statement to get the GNUPlot plot a grah for me:

plot "force.dat" using 1:2 title "Detroit" with lines, \
     "force.dat" u 1:3 t "US Avergae" w linepoints

and the "force.dat" looks like

2005  0   0
2006 104 51
2007 202 101

It draws nice graph for me. However, I don't like the X-axis, because it is labelled as 2005, 2005.5, 2006, 2006.5, 2007 etc.. However, those are year identifiers, I only want the 2005, 2006, 2007 etc., how could I get rid of the 2005.5, 2006.5 etc. labels in my GNUPlot graph?

Thank you very much for your ideas.

+2  A: 

If you have gnuplot 4.1 or later, you can do using 2:xticlabels(1), which might express the intent here. Otherwise, or if you might have missing years in your data but want to show a timeline, you can add a line set xtics 1 before the plot command.

Svante