+ Reply to Thread
Results 1 to 6 of 6

How do you plot real time data into a line graph?

  1. #1
    Registered User
    Join Date
    09-04-2013
    Location
    york
    MS-Off Ver
    Excel 2013
    Posts
    8

    How do you plot real time data into a line graph?

    Hi,

    I have data recorded directly into a spreadsheet as the data becomes available, which I would like to plot in a line graph in real time.
    e.g.
    row 1 = 11:42:00 = 10
    row 2 = 11:43:00 = 9
    row 3 = 11:46:00 = 15

    so to clarify I would like the x-axis to detail each minute like:
    11:42:00 = 10
    11:43:00 = 9
    11:44:00 = 0
    11:45:00 = 0
    11:46:00 = 15

    Thanks in advance

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: How do you plot real time data into a line graph?

    Are the time and values in two different rows?

    If so, just make the range of the graph to where the data will end, not where the data will start; so, for example, use A1:B1000 to create the graph, and then as row A10:B10 is populated for example, the graph will automatically update. Simple!

    If they're not in separate rows you're going to have to split them into helper columns, in like B:C for example.

    Well, if you're adding them in with VBA or an external data link from some data acquisition hardware or something, then there might be problems with how that works out.

  3. #3
    Registered User
    Join Date
    09-04-2013
    Location
    york
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: How do you plot real time data into a line graph?

    Hi Ben,

    Thank you for your response, however I don't think my explanation was very clear. The issue is not the range included - it is a dynamic range, but the missing data on minutes that do not record an entry.

    My x-axis is showing 11.42, 11.43,11.46 instead of 11.42, 11.43, 11.44, 11.45, 11.46 where no data was recorded for two minutes, (I would like this to show as zero on the graph so that every minute is captured).

    The data is directly imported from a scale, so only records weights that it deems acceptable and the time that it was authorised.

    Many Thanks

  4. #4
    Registered User
    Join Date
    09-04-2013
    Location
    york
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: How do you plot real time data into a line graph?

    example data.xlsx I have attached some sample data of how the raw information is imported.
    What I plan to do is count how many entries occur in each minute and plot this in a graph. The issue occurs when the scale is not running for a period of time (e.g.02:56:00 to 03:19:59 data is missing) - this data/ times would not be recorded, and therefore the graph would not plot these minutes on the x-axis. I want to achieve a timeline / time-series.

    Many Thanks

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

    Re: How do you plot real time data into a line graph?

    Here's how I think I would do it:

    1) add a column where you enter each minute. I'm not at all proficient working with Excel's built in date/time serials, so someone else would have to help you with the formulas for this column. It should be as simple as entering an initial time as the first entry of the column, then successive entries will be =previous entry+00:01:00 (or whatever the syntax should look like).
    2) The second column can be either a =FREQUENCY() function using the column from step 1 as the bins_array, or a =COUNTIFS() function counting entries that are between this rows time and the next rows time.
    3) Use these two columns to create the chart.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    09-04-2013
    Location
    york
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: How do you plot real time data into a line graph?

    Thank you MrShorty - I have used the =Frequency() Method which works as requested

    I wanted to avoid having 1440 rows and Frequency/CountIfs, hoping that excel would have a built in function that would identify the column as time values and give you an option to plot as I wanted (No Such Luck!).

    Not to worry - I can work with your solution

    Many Thanks for your help - much appreciated!

+ 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. Line Graph - Do plot zero, Don't plot #NA
    By Janc in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 04-01-2012, 05:45 PM
  2. Data Plots Generate Plot Graph with Solid / Dash Line
    By batmanfan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2010, 12:13 AM
  3. Replies: 1
    Last Post: 12-16-2008, 08:44 AM
  4. [SOLVED] how do I plot a constant value in a line graph?
    By Debby Blaine in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-11-2006, 04:15 AM
  5. [SOLVED] How do I plot both line and column data on same graph?
    By Jackie in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-03-2005, 01:06 PM

Tags for this Thread

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