|
From: Ethan M. <merritt@u.washington.edu> - 2008-09-15 21:13:31
|
On Monday 15 September 2008 09:46:13 Ethan Merritt wrote: > On Sunday 14 September 2008 23:46:02 Shigeharu TAKENO wrote: > > To obtain "30 days" interval tics (not "1 month" interval), > > I think we must specify the interval as 30*24*60*60 (30 days) > > and use the timelevel value TIMELEVEL_DAYS, but the patch forces > > to use TIMELEVEL_MONTHS for "30 days" interval. So, we can not > > obtain "30 days" interval tics even if CVS version. > > You are right. There is a problem. > > Perhaps you can accomplish what you want by using some combination > of strptime() strftime() and the new iteration function for xtics > inspired by your earlier suggestion? This approach seems to work, although it conflicts with the setting "set xdata time". Here is my test case: TFORMAT = "%d-%m-%Y" START = strptime(TFORMAT,"01-01-2001") END = strptime(TFORMAT,"01-01-2003") DAYS30 = 30*24*60*60 unset xdata time set xrange [START:END] set for [date=START:END:DAYS30] xtics (strftime(TFORMAT,date) date) set xtics rotate by -90 plot x The remaining problem is that the command "set xdata time" is applied to both input and output. In order to use the above approach to control output, you must do "unset xdata time". But then you must also explicitly process the input data, rather than using the built-in gnuplot timedata system. So far as I know that work fine, but it is an extra requirement. I asked on the newsgroup a few weeks ago if anyone was aware of missing features that would get in the way of doing the all time processing explicitly using strptime() and strftime(). Hans-Bernhard pointed out that it would be difficult to do the quantization of tick increments if you did this, which is true. It is interesting that you are now offering a case where quantization of tick increments is exactly what you are trying to avoid. So it seems that the built-in and explicit time format handling paths may both be needed. Nevertheless we may want to provide some way of *not* applying the "xdata time" flag to labeling the ticks. Suggestions? -- Ethan A Merritt |