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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:36:54+00:00 2026-06-18T06:36:54+00:00

I would like to visualize the time frame data of my five projects given

  • 0

I would like to visualize the time frame data of my five projects given below. Currently I am using OpenOffice draw application and manually producing the graph shown below. But I am not satisfied. Could you help me to solve the following. Thank you.

1. How can I produce somewhat similar graphs using R (or excel) with better precision in terms of days? 
2. Is there a way for better visualization of the data? If so, please let me know how to produce that using R or Excel. 

Project     Time
-------    ------ 
A   Feb 15 – March 1
B   March 15 – June 15
C   Feb 1 – March 15
D   April 10 – May 15
E   March 1 – June 30

enter image description here

  • 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-18T06:36:55+00:00Added an answer on June 18, 2026 at 6:36 am

    ggplot2 provides a (reasonably) straightforward way to construct a plot.

    First you need to get your data into R. You want your starting and ending dates to be some kind of Date format in R (I have used Date)

    library(ggplot2)
    library(scales) # for date formatting with ggplot2
    
    DT <- data.frame(Project = LETTERS[1:5], 
      start = as.Date(ISOdate(2012, c(2,3,2,4,3), c(15,15,1,10) )),
      end = as.Date(ISOdate(2012, c(3,5,3,5,6), c(1,15,15,15,30))))
    # it is useful to have a numeric version of the Project column (
    DT$ProjectN <- as.numeric(DT$Project)
    

    You will also want to calculate where to put the text, I will use `ddply1 from the plyr package

    library(plyr)
    # find the midpoint date  for each project
    DTa <- ddply(DT, .(ProjectN, Project), summarize, mid = mean(c(start,end)))
    

    You want to create

    • rectangles for each project, hence you can use geom_rect
    • text labels for each midpoint

    Here is an example how to build the plot

    ggplot(DT) + 
       geom_rect(aes(colour = Project,ymin = ProjectN - 0.45, 
                    ymax = ProjectN + 0.45,  xmin = start, xmax = end)), fill = NA) + 
      scale_colour_hue(guide = 'none') +  # this removes the legend
     geom_text(data = DTa, aes(label = Project, y = ProjectN, x = mid,colour = Project), inherit.aes= FALSE) + # now some prettying up to remove text / axis ticks
      theme(panel.background = element_blank(), 
            axis.ticks.y = element_blank(), axis.text.y = element_blank()) + # and add date labels
      scale_x_date(labels = date_format('%b %d'), 
      breaks = sort(unique(c(DT$start,DT$end))))+ # remove axis labels
      labs(y = NULL, x = NULL) 
    

    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 some data that I would like to visualize. Each byte of the
I often visualize one time series against another using scatterplots in Excel, but since
I would like to know what are your best practices in using and disposing
I'm using hierarchical clustering to try to visualize a large set of data that
I would like to render an animated voxel scene using WebGL and Three.js, for
I would like to visualize input to and results of activities in UML activity
I have the following problem: I would like to visualize a discrete and a
I have a netcdf file that I would like to just visualize the soil
I would like detect if my web page is visualize with a UIWebView in
I have written an application to compute the FFT and I would like to

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.