
Chapter II-12 — Graphs
II-280
Depending on the extent of the axis, the tick mark labels may show date or date and time. You can suppress
the display of the date when both the date and time are showing by selecting the Suppress Date checkbox.
This checkbox is irrelevant when you choose the elapsed time mode in which dates are never displayed.
Use the Axis Range tab of the Modify Axis dialog to enter axis range values in terms of seconds, times, dates
or date/times. When you enter the dialog, Igor automatically chooses a format appropriate for the axis you
are working on.
Date/Time Examples
The following example shows how you can create a date/time graph of a waveform whose Y values are tem-
perature and whose X values, as set via the SetScale operation, are dates:
// Make a wave to contain temperatures for the year
Make /N=365 temperature // single precision data values
// Set its scaling so X values are dates
Variable t0, t1
t0 = Date2Secs(2000,1,1); t1 = Date2Secs(2001,1,1)
SetScale x t0, t1, "dat", temperature // double-precision X scaling
// Enter the temperature data in the wave's Y values
t0 = Date2Secs(2000,1,1); t1 = Date2Secs(2000,3,31) // winter
temperature(t0, t1) = 32 // it's cold
t0 = Date2Secs(2000,4,1); t1 = Date2Secs(2000,6,30) // spring
temperature(t0, t1) = 65 // it's nice
t0 = Date2Secs(2000,7,1); t1 = Date2Secs(2000,9,31) // summer
temperature(t0, t1) = 85 // it's hot
t0 = Date2Secs(2000,10,1); t1 = Date2Secs(2000,12,31) // fall
temperature(t0, t1) = 45 // cold again
// Smooth the data out
CurveFit sin temperature
temperature= K0+K1*sin(K2*x+K3)
// Graph the wave
Display temperature
SetAxis left, 0, 100;Label left "temp"
Label bottom "2000"
We chose Day
of Week, which
caused two
more controls to
be shown.
Custom
Format
selected.
100
80
60
40
20
0
temp
1/1/2000 3/1/2000 5/1/2000 7/1/2000 9/1/2000
11/1/2000
2000
Kommentare zu diesen Handbüchern