我正嘗試用ggplot2()構建一個bubbleplot。我想增加圖表的邊際,但是,儘管我已經嘗試了幾個解決方案,但都沒有工作。增加空白bubbleplot ggplot2()
圖表是folling
代碼I'm使用如下
ggplot(data,aes(Var1,Var2,fill=Var1))+
geom_point(aes(size=Var3/3),shape=21,show.legend = FALSE)+ theme(axis.title.y=element_text(vjust=0))+
scale_size_identity()+
theme(panel.grid.major=element_line(linetype=2,color="black",size=0.1),
axis.text.x=element_text(angle=90,hjust=1,vjust=0))
這裏是數據集
Var1 Var2 Var3
1 T_1 T1 5.014627
2 T_12 T1 3.523363
3 T_3 T1 4.583498
4 T_7 T1 220.842570
5 T_9 T1 96.106181
6 T_1 T2 156.281533
7 T_12 T2 4.296740
8 T_3 T2 17.103414
9 T_7 T2 80.447975
10 T_9 T2 54.612852
11 T_1 T3 79.213905
12 T_12 T3 4.548642
13 T_3 T3 65.326722
14 T_7 T3 67.283008
15 T_9 T3 220.642854
16 T_1 T4 268.852172
17 T_12 T4 306.466099
18 T_3 T4 66.043928
19 T_7 T4 30.752214
20 T_9 T4 38.575883
21 T_1 T5 253.413462
22 T_12 T5 3.289762
23 T_3 T5 5.201571
24 T_7 T5 106.649741
25 T_9 T5 2.034214
我將不勝感激建議
類似'+ scale_x_continuous( expand = c(0.1,0))+ scale_y_continuous(expand = c(0.1,0))'?如果不是這樣,你至少必須給出一個可重複的例子,並澄清那些不起作用的「幾種解決方案」。 – Axeman
這是什麼數據?這個'Var'&'Var2'在哪裏?這個'Var3'是什麼? – hrbrmstr
親愛的Axeman和hrbrmstr - 我已經用數據集編輯過這個帖子 – FranciscoC