This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bubble plot in R

Hi, all I have used this script to get this bubble plot

library(reader)

data <- read.csv

r <- c(1,194,26302,81,69, 12,11617,55,10)

dfdata = data.frame(data,r)

dfdata

sizeRange <- c(5,20)

library(ggplot2)

ggplot(data, aes(x=0,ï..Phylum)) +
  geom_point(aes(size = r,alpha = 7,colour = "red", stroke=2)) +
  scale_size(range = sizeRange) + theme_minimal()+theme(legend.position = "none")

I am trying to reduce the axis distance for this plot. How that can be done. And also, these bubble size is not coming properly according to the "r" values.

Please help.

Thank you

enter image description here

bubble chart r

Define the axis limits and intervals. Why dfdata is not used in plotting? data has no r column. Plot aes also seem to have typo.

0 answers

No answers yet.

Log in to answer this question.