|
From: Rich S. <rsh...@ap...> - 2011-06-03 22:31:05
|
I'm essentially new to gnuplot although I used it lightly a dozen or so years ago. I think it's the only tool that will allow me to plot a time series with dates as the labels on the x-axis tics. While my script will be tuned to make it more presentable, the immediate need is to learn how to turn a date (such as 2009-05-13) 90 degrees counterclockwise and limit the number of labels on the x-axis range. The plot is daily precipitation at a monitoring station over three years. The code is: set datafile missing "NA" set xdata time set timefmt "%Y-%m-%d" set format x "%d-%m-$Y" set nokey set xlabel "Date" rotate by 270 set ylabel "Precipitation (in)" set title "Daily Precipitation 2008-2010: CC-OR-8" set size ratio -2 plot "cocorahs.dat" u 1:($2) w boxes The first few lines of the data file are: 2008-01-01 NA 2008-01-02 0.06 2008-01-03 0.60 2008-01-04 0.27 2008-01-05 0.56 2008-01-06 0.20 2008-01-07 0.44 I can provide the entire data file (all 920 lines, 15K) if desired. Please point me in the right direction for adjusting the x-axis labels so they are both readable and complete (rather than the current "05-13-%Y". Rich |