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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:14:51+00:00 2026-05-24T20:14:51+00:00

I am a newbie to R. I would like to create a barplot which

  • 0

I am a newbie to R. I would like to create a barplot which is visually divided into different parts.

My data looks like the following:

"1.0";"0.0";"1.0";"2.0";"710";"12500"

first four numbers give the number of parts that need to be ordered from the two parts list below. The fifth number gives the result sum of the first part, the sixth then the result sum of the second part.

part 1: 10;50;100;300
part 2: 500;1000;2000;5000;

this is how it is calculated.

1 * 10 + 0 * 50 + 1 * 100 + 2 * 300 = 710 ;
1 * 500 + 0 * 1000 + 1 * 2000 + 2 * 5000 = 12500

So what I now want to plot is for example the value 12500, but I want to visually divide this value into the different part (stacked bars) like two five thousands, then one two thousand then one five hundred -> the bar should consist of these parts which can visually be seen or marked with the value (would be nice to have different colors for each part in the part)

How can I do it? Folks, I did my homework, I searched a lot and did try it on my own, but couldn’t achieve what I want.

  • 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-05-24T20:14:51+00:00Added an answer on May 24, 2026 at 8:14 pm
    daten <- matrix(c(10,50,100,300,500,1000,2000,5000),ncol=2) 
    multiplier <- c(1,0,1,2)
    barplot(daten*multiplier)
    

    To display bar segments in reverse order, you need to rearrange the rows in the daten*multiplier array:

    barplot((daten*multiplier)[nrow(daten):1,])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ASP.NET newbie here. I would like to create a form with multiple types of
I'm an R/ggplot newbie. I would like to create a geom_line plot of a
I'm a newbie on web development and I would like to create a page
This is kind of newbie question on objective-c: I would like to create a
I'm a newbie in WPF and I would like to ask if it's possible
StructureMap newbie question. public class SomeClass: IInterface1, IInterface2 { } I would like the
I am a newbie to android development, and would like to know if it
I am a newbie if it comes to web site development. I would like
Got a simple Newbie kind of a question. I would like to share an
Got a simple Newbie kind of a question. I would like to share an

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.