Time series plot with date/time x-axis to scale

zamshabeer

Starting to get Involved
Hello

I have data that is sample at various times across multiple days. The frequency of sampling is not fixed, nor is the interval between sampling times.

When I plot the data as a time series, the graph does not represent the time interval between samples. It appears as if I have taken the samples every x hours.

Is there a way to set the x-axis to scale?

To put it in another way, here is another example, I have data for Jan, Feb, Nov and Dec. I want the graph to show 2 data points on the left of the graph, a gap for the months in between and then data for Nov and Dec on the right. But I can't get this to work. All I get is 4 data points equally spaced out.

For the 2nd example above, it is easy to put some spacing by using blank rows for the months in the middle. But the 1st example is the real data that I am working with and that is measured down to the minute for the sampling time. So I can't have so many blank rows.

I hope I have explained the issue clearly enough.

Thanks
Alakazam
 

John Predmore

Trusted Information Resource
I will assume you use MS Excel to plot data. Instead of choosing a Line chart, choose an XY chart, with dates as the X range. The dates are entered as numerical date codes, not as text. This method would also reflect there are 31 days between Jan 1 and Feb 1, but 28 days between Feb 1 and Mar 1 (and adjust for leap years!). You mentioned time is measured down to the minute. The same XY chart can arrange points within the same day but not the same time, when you add time to the date entry, Time is saved to the date code in decimal form, as a fraction of a 24-hour day.
 

zamshabeer

Starting to get Involved
I will assume you use MS Excel to plot data. Instead of choosing a Line chart, choose an XY chart, with dates as the X range. The dates are entered as numerical date codes, not as text. This method would also reflect there are 31 days between Jan 1 and Feb 1, but 28 days between Feb 1 and Mar 1 (and adjust for leap years!). You mentioned time is measured down to the minute. The same XY chart can arrange points within the same day but not the same time, when you add time to the date entry, Time is saved to the date code in decimal form, as a fraction of a 24-hour day.

hi John.

Thank you for the response.

I am using Minitab and looking for a solution in Minitab. But your solution in excel will be used for now. Thanks you. If you know how this can be achieved using Minitab, that’ll be really helpful. Thanks.
 

Miner

Forum Moderator
Leader
Admin
When in the main menu for Times Series Plot, select the Time/Scale button. Select the Stamp radio button then enter a column from your worksheet with the dates into the Stamp columns field.
 

zamshabeer

Starting to get Involved
When in the main menu for Times Series Plot, select the Time/Scale button. Select the Stamp radio button then enter a column from your worksheet with the dates into the Stamp columns field.
Hi Miner.

I tried that before, but I still don't get a gap as expected. See attached image. In the image, I need a gap between 08-Jan and 20-Jan for the 12 days in between. All the other dates are spaced 1 day apart. Except for these 2 data points.

1657890056147.png
 

zamshabeer

Starting to get Involved
Hi Miner - thank you for response. But that's not what I am looking for. I don't want to add blank rows for dates that I dont have data. The dataset I receive is a bunch of dates and corresponding data values. Sometimes the dates are consecutive, sometimes they are not. I don't want to go through the whole list of dates and add blank rows. Does that makes sense?
 

Miner

Forum Moderator
Leader
Admin
It makes sense, but I don't know of a way of doing that in Minitab without pre-processing the data first, possibly in Excel.
 

zamshabeer

Starting to get Involved
It makes sense, but I don't know of a way of doing that in Minitab without pre-processing the data first, possibly in Excel.
Hi Miner - no probs - thanks for looking into this. The x-y scatter option in Excel solves my problem. But I was trying look at a way of doing it in Minitab.
 
Top Bottom