PC Review


Reply
Thread Tools Rate Thread

Discretionary X-axis (for date & time)

 
 
Frank
Guest
Posts: n/a
 
      20th Sep 2006
Hi,

Im trying to plot some stock price data in a graph but running into the
following problem:

The data i want to plot is non continuous, i.e. the datetime should stop at
5.30 pm and continu on 9 pm the next day. When i try to do that with a
scatter or line graph, it does not work.

I guess one workaround would be to make an additional series that translates
the date & time to e.g. 1, 2, 3 ,etc leaving out the dates& times i dont
want to show. Tried this and it seems to work except for the fact that the
interval between my datapoints isnt always the same. This makes the scaling
of the graph not correct. (eg time between 2 points is sometimes 5 mins,
and sometime only 1 minute)

any suggestions?


 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      21st Sep 2006
Try a different transformation. You want to adjust the fractional part so
that 0 is at 9 am and 1 is at 5:30 pm.

With your original date-time in column A, starting in A2, insert a column,
the new B column, and in B2 use this formula:

=INT(A2)+(A2-INT(A2)-TIME(9,0,0))/(TIME(17,30,0)-TIME(9,0,0))

and fill this down the column. Use column B as the new X value in your XY
chart.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Frank" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> Im trying to plot some stock price data in a graph but running into the
> following problem:
>
> The data i want to plot is non continuous, i.e. the datetime should stop
> at 5.30 pm and continu on 9 pm the next day. When i try to do that with a
> scatter or line graph, it does not work.
>
> I guess one workaround would be to make an additional series that
> translates the date & time to e.g. 1, 2, 3 ,etc leaving out the dates&
> times i dont want to show. Tried this and it seems to work except for the
> fact that the interval between my datapoints isnt always the same. This
> makes the scaling of the graph not correct. (eg time between 2 points is
> sometimes 5 mins, and sometime only 1 minute)
>
> any suggestions?
>



 
Reply With Quote
 
Frank
Guest
Posts: n/a
 
      24th Sep 2006
Thanks Jon,

Worked like a charm!


"Jon Peltier" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Try a different transformation. You want to adjust the fractional part so
> that 0 is at 9 am and 1 is at 5:30 pm.
>
> With your original date-time in column A, starting in A2, insert a column,
> the new B column, and in B2 use this formula:
>
> =INT(A2)+(A2-INT(A2)-TIME(9,0,0))/(TIME(17,30,0)-TIME(9,0,0))
>
> and fill this down the column. Use column B as the new X value in your XY
> chart.
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> http://PeltierTech.com
> _______
>
>
> "Frank" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi,
>>
>> Im trying to plot some stock price data in a graph but running into the
>> following problem:
>>
>> The data i want to plot is non continuous, i.e. the datetime should stop
>> at 5.30 pm and continu on 9 pm the next day. When i try to do that with a
>> scatter or line graph, it does not work.
>>
>> I guess one workaround would be to make an additional series that
>> translates the date & time to e.g. 1, 2, 3 ,etc leaving out the dates&
>> times i dont want to show. Tried this and it seems to work except for the
>> fact that the interval between my datapoints isnt always the same. This
>> makes the scaling of the graph not correct. (eg time between 2 points is
>> sometimes 5 mins, and sometime only 1 minute)
>>
>> any suggestions?
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date/Time on X axis mrgou Microsoft Excel Charting 3 26th Jun 2011 08:22 PM
xy scatter with date/time as x axis =?Utf-8?B?bWFyeWo=?= Microsoft Excel Charting 2 3rd May 2007 10:21 PM
Date & Time on X Axis =?Utf-8?B?Z2FtYWxh?= Microsoft Excel Charting 5 21st Sep 2006 08:00 PM
Time and Date on X axis DataMan Microsoft Excel Charting 16 20th Sep 2003 06:21 PM
Time / Date on X axis Doug Microsoft Excel Charting 2 25th Aug 2003 02:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:28 PM.