I want to create a bubble plot without the y axis, meaning the x axis represents a range between certain values and the size of the bubbles corresponds to a "number" variable.
Since geom_point()
requires a y variable, I created a new
column with only zero values and assigned it to the y axis.
ggplot(df, aes(x=range, y=new, size = numberPoints)) +
geom_point(alpha=0.5, shape=19) +
scale_size(range = c(.1, 24)) +
scale_y_continuous(breaks = NULL)
However, it gave the following result (the y axis is too large):
I only wanted the bubbles above the x axis (without too much space), but I can't find a way to do it.