Plotting date/times [message #4604] |
Wed, 05 July 1995 00:00  |
bleau
Messages: 24 Registered: November 1993
|
Junior Member |
|
|
Hello, a quick (hopefully simple) question. I am plotting times along my X
axis. Internally I've converted the m/d/y h:m:s times into floating point
numbers, thinking this would be the easier way to plot it. I then have a
procedure which I specify to the XTICKFORMAT keyword to convert a float to the
proper character string.
The problem is that IDL keeps scaling the ticks onthe X axis to nice, round
multiples of the floating values, which hardly *ever* map to nice, round
numbers (like 24 hours, or 1 hour) on my time axis labels. I partially solved
this by specifying my own min and max using XRANGE and XTICKS, but this leaves
me without any minor tick marks. Also, I'd like to leave some room on the
right side of the graph after the plot has finished to annotate the graph
lines (there are several).
Has anyone solved this problem satisfactorily in some other manner? Or is the
approach I'm taking the only one available? I couldn't find any info in TFM
about date/time as a data type, which would have been ideal. Thanks.
Larry Bleau
University of Maryland
bleau@umdsp.umd.edu
301-405-6223
|
|
|
Re: Plotting date/times [message #4686 is a reply to message #4604] |
Sun, 09 July 1995 00:00  |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <3temc6$rlb@hecate.umd.edu>, bleau@UMDSP.UMD.EDU (Lawrence Bleau) writes:
> Hello, a quick (hopefully simple) question. I am plotting times along my X
> axis. Internally I've converted the m/d/y h:m:s times into floating point
> numbers, thinking this would be the easier way to plot it. I then have a
> procedure which I specify to the XTICKFORMAT keyword to convert a float to the
> proper character string.
>
> The problem is that IDL keeps scaling the ticks onthe X axis to nice, round
> multiples of the floating values, which hardly *ever* map to nice, round
> numbers (like 24 hours, or 1 hour) on my time axis labels. I partially solved
> this by specifying my own min and max using XRANGE and XTICKS, but this leaves
> me without any minor tick marks. Also, I'd like to leave some room on the
> right side of the graph after the plot has finished to annotate the graph
> lines (there are several).
>
I think that by using XSTYLE=1 you can force IDL to use your XRANGE and still
get minortick marks.
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
|
|
|