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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:47:32+00:00 2026-06-05T15:47:32+00:00

I ran a program with different threads in two configurations a and b .

  • 0

I ran a program with different threads in two configurations a and b. I breakdown its timings into btime, stime, and vtime. Please see below for the data. I need to draw stacked plot as you can see below. However, I face difficulty in representing both the number of threads and configs as x-axis labels in R. Could some one help to produce a better representation of this data in terms of stacked plots in R please. Please see the figure and the R code I am using below.

Data:

config threads  btime   stime   vtime
a   2   0.08    0.32   0.09
b   2   0.32    0.19   0.16
a   4   3.72 2841.13   0.22
b   4   18.21 2865.79   5.12
a   8   5.45 2824.46   4.77
b   8   23.27 2790.14  11.89
a   16  57.63 3302.55  94.25
b   16  62.41 4041.19  82.56
a   32  119.08 3705.62 210.14
b   32  183.01 4411.14 234.17
a   64  211.51 2823.69 270.38
b   64  364.38 4091.97 387.83

R code

> barplot(t(data1[c(3:5)]), ylab="Time(seconds)", sp=c(0.1, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2, 1.0, 0.2),col=c("white","gray20","gray60"))
> legend("topleft",legend=c("btime","stime","vtime"), bty="n",cex=1.5 , horiz=T, adj=0.2, fill=c("white","gray20","gray60"))

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-05T15:47:34+00:00Added an answer on June 5, 2026 at 3:47 pm

    ggplot and lattice are very helpful here, however it is useful to think of the data in a different manner: you will want to represent it as something like

    config threads time_type time_value
    [...]  [...]    vtime     0.03
    

    melt from reshape accomplishes this (see tutorial http://www.statmethods.net/management/reshape.html)

    Then, you can do a plot of something like…
    qplot(config, time_value, data=data, group=time_type, fill=time_type, geom="barplot", facets= .~threads)

    (tutorial @ http://www.r-bloggers.com/basic-introduction-to-ggplot2/)

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

Sidebar

Related Questions

I'm currently preparing a major Program-Update and ran into following problem: I've got a
I have a program that compares two files. I ran visual studio analysis and
I ran a C program and got different output on different C compilers. Below
I am trying to build a C# program that converts a different language into
How can I run the same program two times or more with different names
There are two problems I ran into last night which I have resolved now,
when I ran a program which will cause the segmentation fault as root user
We have a Perl program that ran well on all Windows platforms so far.
so I upgraded to python 3.1.1 from 2.6 and i ran an old program
I ran the .exe for my program from the debug folder. It worked, but

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.