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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:10:40+00:00 2026-06-08T21:10:40+00:00

I asked a question about making bubble charts in ggplot2 here . My follow-up

  • 0

I asked a question about making bubble charts in ggplot2 here.

My follow-up questions are:

1)how do I interprete the scale_size in the legend?

2) Does small dot (labeled 10) mean the data can be anything from 5-10? If the data for a particular point is 8, does scale_area function change the data point to 10 before it is presented as a dot size 10 on the graph.

3) is there a way to plot negative number on ggplot bubble chart? Some software can make the negative data a color bubble.

4) I tried to incorporate scale_area and scale_alpha but the legend shows 2 scales. I just want a combined one. How do I do that?

ggplot(dataset, aes(x = N, y = PctCens, size = BiasAM, alpha=BiasAM ,label = NULL)) +
geom_point(shape = 16) + 
scale_area(to = c(1, 10), breaks = c(0, 10, 30, 50, 70, 100)) +
scale_x_continuous("Sample size", limits = c(0, 100)) + 
scale_y_continuous("Percent censored", limits = c(0, 100)) +
facet_wrap(~Method,ncol=2) + 
theme_bw()+
opts(
panel.grid.minor = theme_blank(),
panel.background = theme_blank(),
axis.ticks = theme_blank(),
axis.title.x=theme_text(face='bold',vjust=0.2, size =12), 
axis.title.y=theme_text(face='bold',angle=90, vjust=0.2,size =12))

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-08T21:10:41+00:00Added an answer on June 8, 2026 at 9:10 pm

    Here is how I ended up solving my problem with negative numbers in bubble chart.

    The original BiasAM (called OrgBiasAM) variable has negative numbers so I took the absolute value of it and created a new variable called BiasAM which i used in the above code. To distinguish between the negative and positive numbers, I made a new categorical variable called BiasAMCat using ifelse statement

    dataset$BiasAMCat <-ifelse(dataset$OrgBiasMA < 0, ‘Negative’, ‘Positive’)

    The modified code is now:

    ggplot(dataset, aes(x = N, y = PctCens, size = BiasAM, colour=factor(BiasAMCat) ,label =       NULL)) +
      geom_point(shape = 16) + 
      scale_area(to = c(1, 10), breaks = c(0, 10, 30, 50, 70, 100)) +
      scale_colour_manual(name=NULL, values=c('grey','black')) +  # for bw printing
      scale_x_continuous("Sample size", limits = c(0, 100)) + 
      scale_y_continuous("Percent censored", limits = c(0, 100)) +
      facet_wrap(~Method,ncol=2) + 
      theme_bw()+
      opts(
      panel.grid.minor = theme_blank(),
      panel.background = theme_blank(),
      axis.ticks = theme_blank(),
      axis.title.x=theme_text(face='bold',vjust=0.2, size =12), 
      axis.title.y=theme_text(face='bold',angle=90, vjust=0.2,size =12))
    

    Note: If you like gradient color, you can use color_gradient as suggested by Andy W instead of scale_colour_manual.

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

Sidebar

Related Questions

I asked a question about making a greatest n per group type query yesterday
i have asked a question about manytomanyfield here which i solved but now a
I've asked questions about Quartz.NET a lot today, but I'm making progress in understand
Krumelur asked this question about how create a recipient bubble similar to the mail.app.
I asked a question about same code but got lost in translation Here's what
I have asked several questions about making links on images in matlab, but I
I asked a question about signal on windows with the same code,here is another
I have tried looking though several of the already asked question about this topic
Just asked a question about linking Boost libraries in the make file. Thanks to
I asked a question about building custom Thread Safe Generic List now I am

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.