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 9119981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:31:32+00:00 2026-06-17T05:31:32+00:00

I have two set of time series data. I would like to plot them

  • 0

I have two set of time series data.
I would like to plot them in a single plot.
Moreover, plot should be in fix scale for y-axis from -3 to 15 and presents a and b where x axis is Time and date and y axis is v1.

Data a :
TimeAndDate v1

1  2007-09-30 00:00:00 0.3460000
2  2007-09-30 01:00:00 0.1660000
3  2007-09-30 02:00:00 0.2066667
4  2007-09-30 03:00:00 0.2956667
5  2007-09-30 04:00:00 0.2220000
6  2007-09-30 05:00:00 0.6090000
7  2007-09-30 06:00:00 0.8480000
8  2007-09-30 07:00:00 1.1986667
9  2007-09-30 08:00:00 1.4696667
10 2007-09-30 09:00:00 1.6280000

Data b:
TimeAndDate v1

1  2007-09-29 00:00:00 -1.3250000
2  2007-09-29 01:00:00 -0.4670000
3  2007-09-29 02:00:00 -0.4426667
4  2007-09-29 03:00:00 -0.6396667
5  2007-09-29 04:00:00 -0.7843333
6  2007-09-29 05:00:00 -0.5563333
7  2007-09-29 06:00:00 -0.7276667
8  2007-09-29 07:00:00 -0.6260000
9  2007-09-29 08:00:00 -0.7290000
10 2007-09-29 09:00:00  0.4976667

Expected results:

plot

I have merged data as temp by code:

 temp <- data.frame(HMn29_29$avg_val,HMn28_29$avg_val,HMn29_29$h)


   HMn29_29.avg_val HMn28_29.avg_val          HMn29_29.h
1        -1.3250000       -1.9225000 2007-09-29 00:00:00
2        -0.4670000       -1.6676667 2007-09-29 01:00:00
3        -0.4426667       -1.5820000 2007-09-29 02:00:00
4        -0.6396667       -1.5716667 2007-09-29 03:00:00
5        -0.7843333       -1.8290000 2007-09-29 04:00:00
6        -0.5563333       -1.6153333 2007-09-29 05:00:00
7        -0.7276667       -1.8093333 2007-09-29 06:00:00
8        -0.6260000       -1.9303333 2007-09-29 07:00:00
9        -0.7290000       -1.3980000 2007-09-29 08:00:00
10        0.4976667        1.2270000 2007-09-29 09:00:00

plot code:

ggplot(temp, aes( HMn29_29.h)) + 
+     geom_line(aes(y = HMn28_29.avg_val, colour = "var0")) + 
+     geom_line(aes(y = HMn29_29.avg_val, colour = "var1"))

How can I fix the y-axes to -3 to 15?

  • 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-17T05:31:33+00:00Added an answer on June 17, 2026 at 5:31 am

    Putting the tables to a one table:

     temp <- data.frame(HMn29_29$avg_val,HMn28_29$avg_val,HMn29_29$h)
    

    Plotting:

    temp <- data.frame(HMn29_29$avg_val,HMn28_29$avg_val,HMn29_29$h)
    ggplot(temp, aes( HMn29_29.h)) + ylim(-2,13)+
         geom_line(aes(y = HMn28_29.avg_val, colour = "Temprature")) + 
        geom_line(aes(y = HMn29_29.avg_val, colour = "TempratureA"))+ opts(title = 'chart_title')
    

    Results:

    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 have two set of samples that are time independent. I would like to
I have two sets of data with different time stamps. One set of data
I have a large time series data set, which I've used xts to summarize
I have a large time-series set of data at 30 minute intervals and trying
I have two tables set up in phpmyadmin- table userid and table data. The
I have a two models set up like this: class User < ActiveRecord::Base #
I have two results from a data set. I want to add both results
I have set up a Core Data model where I have two objects, say
I have a (C#) genetic program that uses financial time-series data and it's currently
Hi I have to set two address at a time in google map. User

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.