Bubble plot in R
0
0
Entering edit mode
2.9 years ago

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 • 737 views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2226 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6