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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:06:05+00:00 2026-06-10T17:06:05+00:00

I would like to use ggplot2 for this but have no idea where to

  • 0

I would like to use ggplot2 for this but have no idea where to look. I have a global start and end time min(begin) and max(end) respectively which is my x axis. My y axis would be each processor and my data includes for each processor the time chunks where the compiler would be busy compiling or linking a specific file. I would like to see the empty areas where a Processor is idle. My df would look like this:

df <- data.frame(proc = as.factor(c('P_1', 'P_1', 'P_1', 'P_2', 'P_2', 'P_3')), begin=c(1, 20, 23 , 3, 5, 8), end=c(5, 19, 21, 4, 9, 100), what=c('compiling A', 'compiling B', 'linking A', 'compiling C', 'compiling D', 'compiling E'))
df
> df
  proc begin end        what
1  P_1     1   5 compiling A
2  P_1    20  19 compiling B
3  P_1    23  21   linking A
4  P_2     3   4 compiling C
5  P_2     5   9 compiling D
6  P_3     8 100 compiling E
> 

How can I do that?

  • 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-10T17:06:06+00:00Added an answer on June 10, 2026 at 5:06 pm

    Something like this?

    library(ggplot2)
    ggplot(df, aes(x=begin, xend=end, y=proc, yend=proc, colour=what)) + 
      geom_segment(size=5)
    

    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 an array of Integers in Java, I would like use only a
I would like to use the logout function from Django but not sure how
I would like to use the MFMailComposeViewController mailComposeDelegate property with completion block syntax, but
I would like use a panel whose children have coordinates specified as percentage of
I would like to use tikzDevice to include annotated ggplot2 graphs in a Latex
I currently have some large strings that I would like use as test data
I would like to use a component that exposes the datasource property, but instead
When using a facet_grid in ggplot2 I would like to be able to have
I would like to use R to extract the speaker out of scripts formatted
I would like to use Maven's password encryption such as it uses for nodes

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.