Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

excel plot against a date time x series [closed]

Tags:

excel

Why does Excel ignore the time component of datetime values in a chart. For example, the following data :

10/10/2010 9:30   1  10/10/2010 9:40   2 10/10/2010 9:50   3 10/10/2010 10:00  4  10/10/2010 10:10  5 10/10/2010 10:20  6 

excel plots it all values on a same x-value 10/10/2010. If I format the values as time, it works fine. How do I tell excel to display datetime and interpret it as datetime not date..

like image 725
user236215 Avatar asked Nov 10 '12 06:11

user236215


People also ask

How do you plot data against dates in Excel?

In the chart, right-click the category axis, and then click Format Axis. In the Format Axis pane, select the Axis Options tab. Expand Axis Options, and then under Axis Type, make sure Date axis is selected. Under Units, next to Base, select Days, Months, or Years.

Why is Excel not plotting my data correctly?

If there's a value in the upper-left corner of the data set (A1 in this case), Excel fails to chart the data correctly. The fix is simple: remove the string in cell A1 and generate the chart again. As you can see in the chart below, that's the only change–the string Year is gone.

How do you make visualization shows events on time series data in Excel?

To create a time series plot in Excel, first select the time (DateTime in this case) Column and then the data series (streamflow in this case) column. Next, click on the Insert ribbon, and then select Scatter. From scatter plot options, select Scatter with Smooth Lines as shown below.


2 Answers

Try using an X-Y Scatter graph with datetime formatted as YYYY-MM-DD HH:MM.

This provides a reasonable graph for me (using Excel 2010).

Excel Datetime XY Scatter

like image 195
jameswarren Avatar answered Sep 20 '22 02:09

jameswarren


I know this is an old question, but I was struggling to do this with a time period over 2 hours, so this might help someone. Also, several of the answers don't actually plot against time, giving equal space whatever the duration.

Firstly, as @jameswarren says, use a scatter graph. Then right-click the horizontal axis and choose Format Axis.

Under Number, select Time, and at this point you may find your scale goes a bit crazy, because it chooses to scale the axis by days. So go back to Axis Options and select Fixed for the Minimum, Maximum and Major unit scales.

To set the unit to hours, type in 1/24 = 0.0416667 (I used half that to get half-hourly increments). To make this start at a round number, multiply it by your preferred number of hours and type that into the Minimum box. In my case 08:00 = 0.333333

graph showing plot against time on x-axis

like image 35
Dazbert Avatar answered Sep 22 '22 02:09

Dazbert