Ummm...not to ask a dumb question, but why do you need the array???
If you have the start time and the end time (of the period where you are collecting the temperatures), isn't that all you need???
Then you just run a loop:
Code:
For sampleTime = startTime To endTime
...plot one temperature value as Y value while using sampleTime as X value ...
Next
Or, if you really wanted the X values to start with zero, then just do:
Code:
For sampleTime = 0 To endTime-startTime+1
...plot one temperature value as Y value while using sampleTime as X value ...
Next
This assumes you keep the startTime and endTime values as integers, of course.
Finally...
SURELY you are storing the temperatures into an array while you are recording them, no?
So why not just
Code:
For sampleTime = 0 To UBound(temperaturesArray)
x = sampleTime
y = temperaturesArray(sampleTime)
... plot x and y ...
Next
It just seems utterly pointless to keep around an array that is nothing but monotonically increasing integers.