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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:08:04+00:00 2026-06-03T14:08:04+00:00

Here is my plot: gr1 <- c(1, 5, 15, 20, 30, 40) gr3 <-

  • 0

Here is my plot:

gr1 <- c(1, 5, 15, 20, 30, 40)
gr3 <- c(1, 5, 10, 25, 40, 60, 80)
gr2 <- c(1, 15, 25, 30, 40)

df2<- data.frame (pos = c(gr1, gr2, gr3), group = c(rep(1, length(gr1)),
 rep(2, length(gr2)), rep(3, length(gr3))))
df2$cpos <- cumsum (df2$pos)
df2$y <- rep(3, length (df2$cpos))
df2$y1 <- rep(0.35, length (df2$cpos))

df3 <- data.frame (cpos = rep(df2$cpos, 2), 
group = rep(df2$group,2), yd = c(df2$y, df2$y1),
x2 = c(rep(1, length (df2$y)),
rep(2, length (df2$y1))))

cx <- ggplot(df3, aes(y = yd, x = cpos, fill=factor(x2)))
cx1 <- cx + geom_area(aes(stat = "identity", position="fill" ))
cx1 +  geom_point(aes(color = factor(group)), pch = 19, size = 4) + 
scale_fill_manual(values=c("blue", "yellow", "green")) + coord_polar()

enter image description here

I could not get rid of some of issues

(1) I could not change color of the points, color change only applied to circles.

(2) the plot additional points plotted at the center circle, which I do not want to plot. (they are additional csum points)

declaration: this post is related with the previous post

Bonus accidental art

As am working hard to solve the issues, I do an sunflower plot.

df2<- data.frame (pos = c(gr1, gr2, gr3), group = c(rep(1, length(gr1)),
 rep(2, length(gr2)), rep(3, length(gr3))))
df2$cpos <- cumsum (df2$pos)
df2$y <- rep(3, length (df2$cpos))
df2$y1 <- rep(0.01, length (df2$cpos))
df2$y3 <- rep(2, length (df2$cpos))

df3 <- data.frame (cpos = rep(df2$cpos, 3), group = c(rep(1, length (df2$y)),
 rep(2, length (df2$y)), rep(3, length (df2$y))),
 yd = c(df2$y, df2$y1, df2$y3), x3 = c(rep(1, length (df2$y)), 
 rep(2, length (df2$y1)),rep(2, length (df2$y1)) ))

makes flower

cx <- ggplot(df3, aes(y = yd, x = cpos, fill=factor(x3)))
cx1 <- cx + geom_area(aes(stat = "identity", position="fill" ))
cx2 <- cx1 +  geom_point(aes(color = factor(group)), pch = 19, size = 4) + 
  scale_fill_manual(values=c("yellow", "pink")) + coord_polar()
cx2 + theme_bw()+ opts(axis.line=theme_blank(),axis.text.y=theme_blank(),
 axis.ticks = theme_blank(), axis.title.y=theme_blank(), 
 plot.background=theme_blank(), panel.border=theme_blank())

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-03T14:08:06+00:00Added an answer on June 3, 2026 at 2:08 pm

    For your second question, is this what you want? The inner circle of points correspond to yd = 0.35 or x2 = 2 in the df3 data frame. Therefore, in the geom_point call, drop those points from the df3 data frame. Here, I’ve use subset.

    # Your data
    gr1 <- c(1, 5, 15, 20, 30, 40)
    gr3 <- c(1, 5, 10, 25, 40, 60, 80)
    gr2 <- c(1, 15, 25, 30, 40)
    
    df2<- data.frame (pos = c(gr1, gr2, gr3), group = c(rep(1, length(gr1)),
     rep(2, length(gr2)), rep(3, length(gr3))))
    df2$cpos <- cumsum (df2$pos)
    df2$y <- rep(3, length (df2$cpos))
    df2$y1 <- rep(0.35, length (df2$cpos))
    
    df3 <- data.frame (cpos = rep(df2$cpos, 2), 
      group = rep(df2$group,2), yd = c(df2$y, df2$y1),
      x2 = c(rep(1, length (df2$y)),
      rep(2, length (df2$y1))))
    
    # The plot
    library(ggplot2)
    cx <- ggplot(df3, aes(y = yd, x = cpos, fill=factor(x2)))
    cx1 <- cx + geom_area(aes(stat = "identity", position="fill" ))
    cx1 +  geom_point(data = subset(df3, x2 == 1), aes(color = factor(group)), 
      pch = 19, size = 4) + 
      scale_color_manual(values=c("blue", "yellow", "green"))  + coord_polar()
    

    The result is:

    enter image description here

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

Sidebar

Related Questions

Here is my plot dat <- data.frame( pos = c(1, 3, 5, 8, 10,
Here is my data and plot nmar <- seq (1, 100, 5) position= rep(nmar,
Here's a plot: library(ggplot2) ggplot(mtcars, aes(x = factor(cyl), y = hp, group = factor(am),
I am trying to create nice (!) polar plot with the following data. gr1
I plot here values over length for a chromosome The middle region without points
Here is data. X <- 1:10 Y <- rnorm (length(X), 5, 2) ticks <-
Here's the setup: I've got a graphical plot of data, and I'm trying to
I use Google Visualization API to plot Line Chart. Here are the codes: google.load(visualization,
I am using matplotlib and numpy to make a polar plot. Here is some
I just wonder how to add annotation in matlab plot? Here is my code:

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.