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

  • SEARCH
  • Home
  • 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 8847435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:11:23+00:00 2026-06-14T12:11:23+00:00

I have a frame with temperature data and the time it was read. It

  • 0

I have a frame with temperature data and the time it was read. It looks like this:

> head(dx)
                       t Temp
1218 2012-11-13 00:01:15   79
1219 2012-11-13 00:07:19   80
1220 2012-11-13 00:15:19   78
1221 2012-11-13 00:22:57   82
1222 2012-11-13 00:30:25   78
1223 2012-11-13 00:43:19   75
...
> tail(dx)
                       t Temp
2240 2012-11-17 13:37:19  106
2241 2012-11-17 13:43:23  106
2242 2012-11-17 13:49:25  106
2243 2012-11-17 13:55:25  106
2244 2012-11-17 14:00:00  107
2245 2012-11-17 14:06:23  107

I want to show it in a graph with ticks for every day. I use

plot(dx$t, dx$Temp/10)

to display the data, which works well, but the ticks shown on x-axis are too few. I would like to show one tick for each day. What’s the best way to do it? There are many questions with slightly different requests, so I got lost. If this questions was asked already I would appreciate a link.

  • 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-14T12:11:24+00:00Added an answer on June 14, 2026 at 12:11 pm

    Here’s one way to achieve this with base plots, but as Justin suggested, you could also look into packages that offer additional flexibility for plotting date objects, such as zoo and xts.

    t <- seq(ISOdatetime(2012,1,1,11,10,25), ISOdatetime(2012,03,31,11,10,25), "hours")
    dx <- data.frame(t=t, Temp=runif(length(t)))
    plot(dx$t, dx$Temp/10, xaxt='n')
    axis(1, at=as.POSIXct(unique(format(dx$t, '%Y-%m-%d')), format='%Y-%m-%d'),
         labels=unique(format(dx$t, '%Y-%m-%d')))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have data frame that looks like the following models cores time 1 4
i have data frame like this : 1 2 3 4 5 1 0.1
I have data frame like this : df <- data.frame(col1 = c(letters[1:4],a),col2 = 1:5,col3
I have data frame with some numerical variables and some categorical factor variables. The
I have an array representing hourly temperature data, and want to compute daily maxima
I have data.frame that contains several factors and i want to rename factor levels
I have a data frame that I've discretized using RWeka . RWeka's discretization creates
i have a frame set where i load some pages like Top -> Header
I have two Excel sheets of climate data: temperature (dtT) and relative humidity (dtR).
I'm trying to use an xml file for spritesheet data; I have a frame

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.