|
From: Ethan M. <merritt@u.washington.edu> - 2005-05-05 16:01:21
|
On Thursday 05 May 2005 07:52 am, Hans-Bernhard Broeker wrote: > > The obviously correct solution would be to pass a timeformat string > directly as a second argument to timecolumn(). Back when I added > per-axis timefmt strings, that wasn't possible. Nowadays, with the > stringvariables patch integrated, it probably is. Yes. Passing a string as a 2nd argument (or even a string-valued function) is easy. The hard part would have been to retain backward-compatibility with scripts using only one argument. Fortunately timecolumn was a secret undocumented function, so there are no such scripts :-) But before anyone plunges in, I point out that there is probably another approach that should be considered. If the task is specifically to read time info from the file and associate it with axis labels, then I think this is almost possible already by passing a sting-function to the [xyz]xticlabels option. The following doesn't quite work, but could be made to work: timeformat = "some time format" plot 'foo' using 4:5:xtic(gprintf(timeformat,column(1))) The trick would be to extend routine plot_ticlabel_using(int axis) in datafile.c so that it parses the argument to xtic() as a general expression rather as an integer constant. That's something I meant to do originally, but never got around to it. It would have uses beyond timeformats, of course. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |