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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:17:40+00:00 2026-06-16T00:17:40+00:00

I have a data frame with many events, each of them having a timestamp.

  • 0

I have a data frame with many events, each of them having a timestamp.

I need a 2-dimensional plot of this: x axis represents days, y axis represents the time of a day (e.g. hours), and the number of events in this hour of this day is represented by the color (or maybe another way?) of the corresponding cell.

First I’ve tried to use

     ggplot(events) + 
      geom_jitter(aes(x = round(TimeStamp / (3600*24)), 
                      y = TimeStamp %% (3600*24))), 

but due to a large number of events (more than 1 million per month) it’s possible to see only the fact that there were events during a specific hour, not how many there were (almost all cells are just filled with black). So, the question is – how to create such a plot in R?

  • 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-16T00:17:40+00:00Added an answer on June 16, 2026 at 12:17 am

    You could make a hexbin plot:

    set.seed(42)
    events <- data.frame(x=round(rbinom(1000,1000, 0.1)),y=round(rnorm(1000,10,3)))
    library(ggplot2)
    library(hexbin)
    p1 <- ggplot(events,aes(x,y)) + geom_hex()
    print(p1)
    

    hexbin plot

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

Sidebar

Related Questions

I have a data frame with an id column and some (potentially many) columns
I have many data.frames, for example: df1 = data.frame(names=c('a','b','c','c','d'),data1=c(1,2,3,4,5)) df2 = data.frame(names=c('a','e','e','c','c','d'),data2=c(1,2,3,4,5,6)) df3 =
I have a data frame like below (20,000 rows by 49 cols). Each row
Suppose that you have a data frame with many rows and many columns. The
I have a data.frame that contains many columns. I want to keep the rows
I have this data frame. I would like to create another data frame from
So I have many data frames and I'm trying to merge them. Some of
I have a set of data that looks like this, species<-ABC ind<-rep(1:4,each=24) hour<-rep(seq(0,23,by=1),4) depth<-runif(length(ind),1,50)
We have some data which represents many model runs under different scenarios. For a
I have very wide data frame and would like to create many short data

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.