Change the size range used in the bubble section

I use R to create a competitive map of strategic groups in the industry that I am studying. The number of exits is along the x axis, Sales is the y axis, as well as the size of the bubble. Used code:

qplot(data = supermarket, x = outlets, y = sales, size = sales, color = retailer)   

However, I need to increase the overall size of the bubbles, as it is too unclear at the moment. See example below.

Graph

I need the bubbles to maintain their size relative to sales, but become larger overall to increase visibility.

+5
source share
1 answer

Play with: + scale_size_continuous(range = c())like in:

#set.seed(10)
#supermarket <- data.frame(sales = sample(1:50000, 12), 
#    outlets = sample(1:3000, 12), retailer = LETTERS[1:12])

#I use ggplot rather than qplot and understand it so that what I used here
ggplot(data = supermarket, aes(x=outlets, y=sales, size=sales, color=retailer)) + 
            geom_point() + scale_size_continuous(range = c(3, 8))

Or you can just use your code and add scale_size_continuousas bdemarest, which offers above:

qplot(data = supermarket, x = outlets, y = sales, size = sales, color = retailer) + 
    scale_size_continuous(range = c(3, 8))

Both will give the same results.

+5

All Articles