10

私はRを使用して、調査している業界の戦略グループの競争力のあるマップを作成しています。アウトレットの数はx軸に沿っており、売上高はy軸であり、バブルのサイズです。使用したコード:

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

ただし、現時点では不明なため、全体の泡のサイズを大きくする必要があります。例については、以下を参照してください。

グラフ

私が必要としているのは、バブルのサイズを売上高に対して維持しながら、全体的に大きくして視認性を高めることです。

4

1 に答える 1

11

Play with:+ scale_size_continuous(range = c())のように:

#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's 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))

または、コードを使用して、scale_size_continuous上記のように bdemarestを追加することもできます。

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

どちらも同じ結果になります。

于 2012-07-19T23:46:03.350 に答える