Date-time axis control version 1.4, 6/8/98, © Michael A. Johnson Requires Igor Pro v3.1 or later (Not tested with all earlier versions) Tested on PowerMac; not tested on IBM compatible. This package includes: "Date-time axis control" v1.4 procedure file and "DateTimeStr2Secs" v1.2 procedure file. General description: Adds control bar to a graph containing a date-time axis, that is, an axis internally represented as seconds since 1/1/04 but displayed as type "dat". Control bar displays axis limits in date-time format and user can use that format to change the axis limits. Optionally, the A and B cursor positions can be displayed in date-time format. User chooses any one axis per graph to control; no limit on number of graphs simultaneously having control bars; no limit on names or locations of axes to be controlled. Multiple graphs can be controlled from a single control bar. ****************** Installation: 1. Put procedure file "Date-time axis control" anywhere. 2. Put procedure file "DateTimeStr2Secs" (or an alias to it) in User Procedures folder. 3. GetInputState XOP is required (available free from WaveMetrics ftp site). Put it (or an alias to it) in Igor Extensions folder before starting Igor Pro. 4. Standard WaveMetrics Procedures "Strings as lists", "NumInList", and "Keyword-Value" are expected to be in WaveMetrics Procedures folder. 5. Load and compile "Date-time axis control" (see Igor manual for compiling procedures). A macro labeled AddDateAxisControl will appear in Utilities menu in menubar. ****************** Usage: 1. Make graph to be controlled the target graph by clicking on it, for example. Click on "AddDateAxisControl" in Utilities menu in menu bar. If graph has more than one date-time axis, user will be given a choice of which to control. 2. Control bar appears on graph. See balloon help attached to each button and value display. Note use of OPTION key for some buttons. ****************** Features: 1. Displays appear in the same military or normal mode as the controlled axis, but input variables can be entered in either format regardless of display format. 2. There are several "shorthand" date and time formats that are acceptable. For instance, the year defaults to 98, the entire date defaults to today's date, the day number is not restricted to the actual number of days in the month (12/32/97 is accepted and converted to 1/1/98), seconds and/or minutes can be left off the time, upper or lower case AM and PM are accepted, etc. Years < 40 are interpreted to be between year 2000 and 2100; years >= 40 are interpreted to be between 1900 and 2000. 3. "Show...limits" button shows name of axis being controlled (name shortened if necessary to fit in space). 4. "Synch." popup menu appears during control bar generation when other graphs have date-time axes with the same name. Use this menu to edit a list of other graphs to be controlled from this control bar. ****************** Demo to try: First load and compile "Date-time axis control" as described above. Then, copy and execute the following commands. Turn on balloon help and play with the buttons (note the option key changes the action of some buttons), type new values into the displays, etc. For example, manually resize one graph with the marquee, use the control bar to display the new axis limits and then synchronize the other graph to those same limits (without retyping any numbers). Move a cursor around and display its new position; try two cursors. Put control bars on both graphs simultaneously. Try putting a control bar on a graph that has two date-time axes, e.g. top and bottom. ´Make/N=100 sig, nois = gnoise(1) ´Setscale/I x,Date2Secs(1998,6,10),Date2Secs(1998,6,11),"dat",sig,nois ´sig = Sin(x/3600) ´Display sig ´Display nois ´AddDateAxisControl() ´ShowInfo ****************** Version info: V1.2 Date-time axis control DateTimeStr2Secs both are first public versions ---- V1.3 Date-time axis control major code reorganization, uses data folders ---- V1.4 Date-time axis control Added ability to control multiple graphs from one control bar ****************** Wish list: 1. Auto update displays when axis is changed manually 99. Igor has all this stuff built in. ****************** Send questions, comments, bug reports, and suggestions to mike-johnson@llnl.gov Michael A. Johnson, Mail Stop L-463 Lawrence Livermore Nat'l Lab 7000 East Ave., P. O. Box 808 Livermore, CA 94551 Fax: (510) 422-6007