0
如果我有scale_fill_coninuous(name='Servings')
並且我希望它是白色的。我怎樣才能爲此設置一個主題參數?在上面的代碼中添加color ='white'不起作用。這是我的ggplot。將顏色條的標題設置爲ggplot2中的白色
ggplot() +
geom_map(data = map.world,map = map.world,colour='white',size=.25, aes(
map_id = region,
x=long,
y=lat,
fill=beer_servings
)) +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
axis.title.x=element_blank(),
axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
axis.title.y=element_blank(),
axis.text.y=element_blank(),
axis.ticks.y=element_blank(),
plot.background = element_rect(fill = "black"),
panel.background = element_rect(fill = "black"),
legend.background = element_rect(fill='black',
size=0.5, linetype="solid"),
legend.text = element_text(colour = 'white'),
legend.position = 'bottom'
)+
scale_fill_continuous(name = "Servings Of Beer \nPer Person, 2010")+
#guides(fill = guide_legend(
#title.theme = element_text(size=10, colour = "white",angle = 0)))+
coord_quickmap()