Mam skrypt poniżej w celu zilustrowania moje pytanie:regulację szerokości legendzie do ciągłej zmiennej w 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
Jak mogę poszerzyć legendę „ciągła zmienna” umieszczony na dole?
Od @Didzis dałeś odpowiedź, której szukałeś, myślałem, że dam ci link do możliwości le atrybutów, które możesz ustawić. [** Tutaj jest **] (https://github.com/hadley/ggplot2/wiki/Legend-Attributes) – Arun