Following some useful discussion on the list, I have now implemented a
first go at this new functionality. As I originally suggested, I have
added a new API function pltimefmt which specifies the format to use.
This uses the C library strftime to do the actual work, so any formats
supported by strftime on your system will be available. 

To enable the date / time labels, use the "d" option (for date) in 
plbox. This will interpret the data as seconds since the epoch. "t" is
already in use so we can't have that.

Example 29 (currently just for C - don't propagate until it is
finalised) demonstrates the functionality.

Some caveats

1) You can enable / disable date-time formats for each axis
independently, but there is currently no way to specify different
formats for each axis. Perhaps we need a plxtimefmt and plytimefmt? As
an example of why we might want to do this, consider plot 2 in example
29.

2) Currently no way of using this with plenv. We need to invent some new
axis codes. 

3) No cmake checks that time.h, strftime and gmtime are available on the
system. There are all in Posix, C89 and C99 so should be available as
standard on all recent compilers. 

4) In order to keep with the same plotting functions this involves cast
PLFLT to time_t, which may have some resolution / range issues. I don't
see any other way of easily doing this though.

5) Possibly others...

Andrew

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to