連續可變下面我有一個腳本來說明我的問題:調整傳說的寬度爲GGPLOT2
temp.df <- data.frame(x=1:100,y=1:100,z=1:100,stringsAsFactors=FALSE)
chart <- ggplot(data=temp.df,aes(x=x,y=y))
chart <- chart + geom_line(aes(colour=z))
chart <- chart + scale_colour_continuous(low="blue",high="red")
chart <- chart + theme(legend.position="bottom")
# so far so good, but I think the legend positioned at bottom with such a small size is a waste of space, so I want to "widen" it using the line below...
chart <- chart + guides(colour=guide_legend(keywidth=5,label.position="bottom"))
# oops, it changed to legend for categorical variable
我怎樣才能擴大位於底部的「連續可變」的傳說?
由於@Didzis給出了你正在尋找的答案,我想我會給出可能的鏈接你可以設置的屬性。 [**這裏是**](https://github.com/hadley/ggplot2/wiki/Legend-Attributes) – Arun