This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to increase space in Y axis label

Hello, Everyone

I have run this R script to get a bubble chart library(reader)

data <- read.csv("C:\Users\user\Documents\class.csv", header=TRUE, stringsAsFact=FALSE

sizeRange <- c(0,20)

library(ggplot2)

ggplot(data, aes(x=0,y=Class)) +

geom_point(aes(size = Total),colour="green",stroke=2) + scale_size(range = sizeRange)+ xlim(-0.02,5)+ theme_bw() + theme(panel.border = element_blank(), axis.line = element_line(colour = "white"))

I got plot like this, enter image description here

I want to increase the space between the bubbles , so that they can look distinct and more clear.

Please suggest

bubble chart r

1 answer

Try to play with axis.title.y

for example:

theme(axis.title.y = element_text(margin = margin(t = 10, r = 20, b = 30, l = 40)))

Log in to answer this question.