DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Additional Date Format Option

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
jgmiles



Joined: 19 Dec 2003
Posts: 14
Location: Salt Lake City, Utah

PostPosted: Fri Dec 19, 2003 6:58 pm    Post subject: Additional Date Format Option Reply with quote

Mr. Hyde,

Is it possible to add a date option that doesn't depend on the Microsoft Excel date system serial number format (and the concommitant programming requirements for conversion)? In my numerical weather model work, the dates are often output as YYYYMMDDTTTT to allow for alphabetic sorting/animations.

Is it possible to add a number format that accepts the YYYYMMDDTTTT format (e.g., 200312191830 to represent Dec 19, 2003 @ 18:30 universal time [i.e., a 24 hour clock]) with equidistant spacing between the dates/times?

Since numerical weather forecasts can be either an hour to hour format, a day to day format, a month to month format, or even a year to year format for climate forecasts, it would be nice if the program automatically truncated the extra unnecessary data in the date format as well. For example, YYYY would display only the year, without displaying the month/day/time (which would all be zeros). YYYYMM would display only the year and month--truncating the extra possible info (DDTTTT), etc., when displayed on the graph.

If I'm missing something obvious or a possible work around (all of which are quite possible!) let me know.

John
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Fri Dec 19, 2003 7:17 pm    Post subject: Reply with quote

John,
Off the top of my head I can't think of a good reason not to do this... except precision might be a problem even though everything has been switched to double-precision. I'll try a few things to make sure this isn't a dead end and give a better answer later on.

Worst case I could write a file import plugin to translate your date/time strings to Excel serial dates before passing to DPlot.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jgmiles



Joined: 19 Dec 2003
Posts: 14
Location: Salt Lake City, Utah

PostPosted: Sat Dec 20, 2003 9:51 pm    Post subject: Reply with quote

David,

Thanks for your quick reply.

Just a thought (feel free to tell me to bug off if I'm making requests that you think are over the top Embarassed )--for those of us who deal with time series a great deal, it would be nice to have a way to internally deal with dates in a more convenient format than presently available, rather than always having to import through a plug-in (I certaily wouldn't want to discourage you from the plug-in option if that is the most feasible for you.); i.e., it would be nice if temporal data on the X-axis could be imported via the clipboard, with manipulation within the program as to date display.

Ultimately, it would be nice to add time formats (e.g. 8 p.m., 8:30 p.m., 20:00, 20:30 etc.) to the current date format options. I assume there are more scientific disciplines that make extensive use of time series than just the atmospheric sciences, and a user-friendly way to deal with the data within the program would sure be nice.

John
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sat Dec 20, 2003 11:06 pm    Post subject: Reply with quote

Looks like double precision will work fine, at least in the few examples I tried. Your example (200312191830) is distinguishable from 200312191831, which is what concerned me. For that matter there's still enough precision for seconds as fractional minutes in the few examples I looked at. I'll try to get this into an update before too long.

Times: Currently DPlot uses your Windows settings (set with Control Panel). But I agree, this should be only a default setting that you can change.

And please don't ever be concerned about over the top requests. All requests, no matter how crazy, are considered Very Happy.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jgmiles



Joined: 19 Dec 2003
Posts: 14
Location: Salt Lake City, Utah

PostPosted: Thu Dec 25, 2003 9:13 pm    Post subject: Reply with quote

Quote:
...it would be nice if the program automatically truncated the extra unnecessary data in the date format as well. For example, YYYY would display only the year, without displaying the month/day/time (which would all be zeros). YYYYMM would display only the year and month--truncating the extra possible info (DDTTTT), etc., when displayed on the graph.


I guess I should add that it would be nice to do the reverse--i.e., display only the time (TTTT), DDTTTT, etc.

Thanks,
John
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Dec 25, 2003 10:27 pm    Post subject: Reply with quote

I think I have this working reasonably well now (my machine only, at the moment). In general DPlot will use the date format and the (new) time format entries on the Number Formats dialog. Exceptions: If the year is 0, then the year isn't displayed. If the month and day are also 0, then only the time is displayed. At the other end, time will always be displayed according to the specified time format. If you don't want to display the time, just blank out the time format string.

One obvious thing I overlooked initially is the scaling. As is right now, 200312260000 will be scaled as if it is 7641 minutes greater than 200312252359, for example. So this isn't quite as simple as the other number formats, which don't effect the scaling in any way. Internally everything will be scaled by the equivalent Excel serial date. I'll most likely have this fixed by the end of the weekend and post a beta version to play with.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sun Dec 28, 2003 6:47 pm    Post subject: Reply with quote

John,
Please take a look: http://www.dplot.com/forums/viewtopic.php?t=43

Any comments you have are certainly welcome.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jgmiles



Joined: 19 Dec 2003
Posts: 14
Location: Salt Lake City, Utah

PostPosted: Sun Dec 28, 2003 7:08 pm    Post subject: Reply with quote

Appreciate your time & effort. I'll play for awhile and see how things go. Smile

--John
Back to top
View user's profile Send private message
jgmiles



Joined: 19 Dec 2003
Posts: 14
Location: Salt Lake City, Utah

PostPosted: Mon Dec 29, 2003 10:25 pm    Post subject: Reply with quote

Quote:
In addition to performing the translation, this new command also sets the number format of the X axis to 'Date and Time' and your Time format string to something that DPlot deems appropriate. If, for example, your time formatting string is 'h:mm:ss tt' and the granularity of the input is 1 hour or greater, then DPlot changes the time format string to 'h tt'. If anyone thinks this automation is too intrusive, your comments are certainly welcome.


David,

I don't mind the initial automation of the number format process, but I need to be able to then change the date format & then have the graph open with the same format (it currently reverts to the automatic settings of the import algorithm when the graph is reopened).

Again, if I'm missing something, let me know.

--John
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Dec 29, 2003 11:14 pm    Post subject: Reply with quote

You haven't missed anything; that's a foulup. The date and time format are saved for Calendar Date, but I goofed on the new Date and Time format. This will be fixed next go-around. Thanks for pointing out the mistake.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Dec 30, 2003 10:41 am    Post subject: Reply with quote

John - Fixed it: http://www.dplot.com/forums/viewtopic.php?t=43

Thanks again.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group