|
From: Ethan M. <merritt@u.washington.edu> - 2006-05-18 18:09:21
|
On Thursday 18 May 2006 09:35 am, Hans-Bernhard Br=F6ker wrote: > Ethan Merritt wrote: > > gnuplot> show xrange=20 > > > > set xdata time > > set xrange [ "01/06/93\t0000" : "01/11/93\t0000" ] noreverse > > nowriteback > > > > gnuplot> print GPVAL_X_MIN > > -207792000.0 > > gnuplot> print GPVAL_X_MAX > > -194572800.0 > > That's to be expected. Time internally is kept in seconds since the > millenium. I.e. there's nothing wrong with the above. I understand that the values are correct in some abstract sense (apart from being printed as negative numbers). But if the point of these GPVAL_* variables is to make the information available to a script, this format fails. We have no mechanism in place to use the value that is returned. =46or example, if you want to lock the x2 axis to agree with x1, the following seems the obvious way to do it: set x2range[ GPVAL_X_MIN : GPVAL_X_MAX ] But that won't work in the above case. =20 I admit to being very unfamiliar with the time/date code. I recently tried to use it for what I thought was a simple case, but got thoroughly tangled up. So I don't even have a suggestion as to how this *should* work, or what would need to be changed. Perhaps it would be sufficient to provide conversion routines? internal-time-in-seconds <=3D=3D> timefmt string Then (I think) it would work to say something like set x2range[ timestring(GPVAL_X_MIN) : timestring(GPVAL_X_MAX) ] =2D-=20 Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |