+ Reply to Thread
Results 1 to 10 of 10

how to get time to graph proportional?

  1. #1
    Registered User
    Join Date
    11-21-2020
    Location
    usa
    MS-Off Ver
    10
    Posts
    13

    how to get time to graph proportional?

    I am a total novice at spreadsheet programing.

    My spreadsheet has two columns. Column A is time of day (always in chronological order.) and column B an integer. When I create a graph time of day is displayed along the x axis and is always equally spaced. What I would like is a graph that displays a 24 hour day with the data points in the proper position.

    If I could post an image it would be clear what I'm describing... but I read that one should not do that?!?

    Anyway... Any help would be very much appreciated.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: how to get time to graph proportional?

    What type of graph are you creating? Line chart? If you create a line chart with time as the x value, Excel will treat it as a "category" value. That is, it won't care what the times are, it will just treat it as series of x values. They will be equally spaced. Click in your chart and go to the menu for Design, and click Change Chart Type. Select "Scatter Plot with Lines". That will treat the x values as actual numbers.

    If any of this is unclear, see yellow banner at the top of the page and attach your file.

    If I could post an image it would be clear what I'm describing... but I read that one should not do that?!?
    Let me clear that up. There is nothing at all wrong with attaching an image. The board supports it, and in some cases images are very helpful. Yours is the perfect example--"I want to make a graph that looks like this". However, many people take screen shots of their Excel sheets and attach those as images. That is next to useless. In that case we much prefer that people attach the actual Excel file, which is easier to do anyway.

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: how to get time to graph proportional?

    What chart type are you trying to use? Are you time values real time values or are they text strings that look like time values?

    First make sure your times are real time values. An ISTEXT() function is often useful here. Or change the number format to general and see if the display changes to a number between 0 and 1. If you discover that your times are really text, use the strategies here (https://support.microsoft.com/en-us/...rs=en-us&ad=us ) to convert the text to numbers.

    Unless there is some reason to use some other chart type, use an XY scatter chart when you x values are time. As long as the time values are real numbers, an XY scatter chart will recognize them as such and position values accordingly.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    11-21-2020
    Location
    usa
    MS-Off Ver
    10
    Posts
    13

    Re: how to get time to graph proportional?

    Quote Originally Posted by 6StringJazzer View Post
    What type of graph are you creating? Line chart? If you create a line chart with time as the x value, Excel will treat it as a "category" value. That is, it won't care what the times are, it will just treat it as series of x values. They will be equally spaced. Click in your chart and go to the menu for Design, and click Change Chart Type. Select "Scatter Plot with Lines". That will treat the x values as actual numbers.

    If any of this is unclear, see yellow banner at the top of the page and attach your file.

    Let me clear that up. There is nothing at all wrong with attaching an image. The board supports it, and in some cases images are very helpful. Yours is the perfect example--"I want to make a graph that looks like this". However, many people take screen shots of their Excel sheets and attach those as images. That is next to useless. In that case we much prefer that people attach the actual Excel file, which is easier to do anyway.
    Thank you... Scatter plot with lines did it!
    I tried to post an image and was refused because I didn't have enough posts...
    The major grid lines along the x axis run from 12am to 12pm with 6am in the middle. All good... but the other grid lines are odd values like 1:12 2:24 3:36 etc... I think it is using time between first data point and last data point instead of time between 12:00am and 12:00pm... any ideas on how to make the gridlines in between 12am and 12pm even?
    I apologize for my convoluted description!
    Thanks for any (more) insight.

  5. #5
    Registered User
    Join Date
    11-21-2020
    Location
    usa
    MS-Off Ver
    10
    Posts
    13

    Re: how to get time to graph proportional?

    OK!... this is worth 1000 words.


    sss.png

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: how to get time to graph proportional?

    Who says the minor gridlines are uneven? Every 72 minutes (0.05 days) seems like a perfectly even grid unit. 0.05 as a minor unit value seems consistent with Excel's default algorithms for automatically choosing minor grid unit.

    If you don't like gridlines every 72 minutes=0.05 day, what would you prefer? Would every 60 minutes=1hour=0.041666666667 days be too many minor gridlines? Maybe you would prefer every 2 hours=120 minutes=0.083333333333 days? Choose whatever division you want for the minor unit, convert it to days, and enter that in the minor unit setting field of the format axis dialog.

    ETA: I didn't see the picture before. It looks like it is using 0.05 days for the major unit, so choose a different value for the major unit setting.

  7. #7
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: how to get time to graph proportional?

    Quote Originally Posted by jw2000 View Post
    I tried to post an image and was refused because I didn't have enough posts...
    I see you successfully posted a picture after this. We allow pictures and attachments to everybody. You have to have something like 10 posts before you can include a live URL link. That's because we get a lot of spam with links to advertising.

  8. #8
    Registered User
    Join Date
    11-21-2020
    Location
    usa
    MS-Off Ver
    10
    Posts
    13

    Re: how to get time to graph proportional?

    Quote Originally Posted by MrShorty View Post
    Who says the minor gridlines are uneven? Every 72 minutes (0.05 days) seems like a perfectly even grid unit. 0.05 as a minor unit value seems consistent with Excel's default algorithms for automatically choosing minor grid unit.

    If you don't like gridlines every 72 minutes=0.05 day, what would you prefer? Would every 60 minutes=1hour=0.041666666667 days be too many minor gridlines? Maybe you would prefer every 2 hours=120 minutes=0.083333333333 days? Choose whatever division you want for the minor unit, convert it to days, and enter that in the minor unit setting field of the format axis dialog.

    ETA: I didn't see the picture before. It looks like it is using 0.05 days for the major unit, so choose a different value for the major unit setting.
    Thank you for taking the time to reply!!! YES... every 2 hours would be ideal. I'm still a bit confused...

    First off... I think the chart above displays only MAJOR grid lines. (when I choose to NOT display major grid lines they go away?)
    Second... can you explain where one changes the axis format? (major unit setting?) When I open the format dialogue I get choices like color and line width...

    Thanks for shedding a bit more light...

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: how to get time to graph proportional?

    Which Excel version are you using? If I read your profile correctly you are using Excel 2010? Then it should be similar to my 2007 procedure. Select the horizontal axis -> format selection -> the "axis options" formatting section should allow you to change the axis limits and major/minor units.

  10. #10
    Registered User
    Join Date
    11-21-2020
    Location
    usa
    MS-Off Ver
    10
    Posts
    13

    Re: how to get time to graph proportional?

    Quote Originally Posted by MrShorty View Post
    Which Excel version are you using? If I read your profile correctly you are using Excel 2010? Then it should be similar to my 2007 procedure. Select the horizontal axis -> format selection -> the "axis options" formatting section should allow you to change the axis limits and major/minor units.

    MrShorty, THANK YOU THANK YOU THANK YOU!!!

    it worked!!!!!mmm.jpg

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 03-06-2016, 09:22 PM
  2. Replies: 2
    Last Post: 03-06-2016, 11:05 AM
  3. Replies: 3
    Last Post: 03-06-2016, 11:02 AM
  4. Replies: 2
    Last Post: 03-06-2016, 11:02 AM
  5. [SOLVED] Graphing with proportional intervas on x-axis, line graph
    By lifeseeker1019 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-15-2014, 04:51 PM
  6. Replies: 2
    Last Post: 08-29-2011, 12:29 PM
  7. Proportional x and y axi
    By Hop David in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-07-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1