Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9244777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:07:01+00:00 2026-06-18T09:07:01+00:00

I want to plot the graph for the time series data for one week,

  • 0

I want to plot the graph for the time series data for one week, like:

Day1    Time    Day2  Time      Day3  Time.......Day7   Time
123    00:00hr  7897  00:00hr   4662  00:00hr    1235   00:00hr   
4562   01:00hr  4645  01:00hr   4564  01:00hr....7898    01:00hr
.....  .......   .... .......   ....  ...............    ......
.....  .......   ....  ......   ....  ...............       .....
.... ..... ....... ...............................................

4653   23:00    46456  23:00hr  7895  23:00hr    7892    23:00hr

I want to plot the graph for above time series data in same graph.The graph should be like it first plot the graph for Day1(of all the 24 hrs) next of it Day2,Day3…consecutively.
The X-axis should be of time index,like (day1,00),(day1,01)…….(day2,00)…

Please help me out of these problem

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:07:02+00:00Added an answer on June 18, 2026 at 9:07 am

    Data generation:

    set.seed(1)
    df <- data.frame(matrix(round(runif(24*7,0,1000), 0), ncol=7))
    colnames(df) <- paste0("Day", 1:7)
    df$Time <- c(sprintf("0%d:00", 0:9), sprintf("%d:00", 10:23))
    df
    

    Here, I believe, you don’t need seven Time columns with same values.

    Now we can use common reshape and ggplot routine:

    require(reshape2)
    require(ggplot2)
    mdf <- melt(df, id.vars="Time")
    g <- ggplot(mdf, aes(x=1:(24*7))) + geom_line(aes(y=value))
    g
    

    Which produces the plot:

    enter image description here

    Some aesthetics for x axis:

    g + scale_x_continuous(breaks=seq(0, 24*7, 24), labels=0:7, name="Days")
    

    enter image description here

    Basic graphics solution:

    plot(mdf$value, type="l")
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to plot the graph for every hour of a 1 week time
I have the data in two files. I want to plot a graph the
I want to use core-plot for drawing line graph dynamically. data won't come at
I just have a data file with one column of time series: '2012-02-01 17:42:44'
I am using Flot Graph Api to plot graphs, I want to plot time
With this approach. I have a line plot graph. I want to plot 'two'
I want to plot multiple rowstacked histograms on the same graph using gnuplot. A
I have a data which I want to plot in cumulative function. The R
I'm (trying to) using JSON with PHP. I want to plot a graph using
I want to plot a 3d graph in matlab By graph I mean in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.