【发布时间】:2015-12-28 12:45:26
【问题描述】:
我正在尝试使用 ggplotly 删除图例标题,但没有成功。我确信有一个简单的解决方法,但我找不到它的文档 - 并且使用 ggplot 删除图例标题(或更改定位)无法正常工作。参见例如:
# Creating the ggplot:
a <- ggplot(mtcars, aes(x = interaction(cyl, carb, lex.order = T),
y = mpg,fill = interaction(cyl, carb, lex.order = T))) +
geom_boxplot() + theme(legend.title=element_blank())
a # No Legend Title
# plotly puts back the legend title
ggplotly(a)
任何想法如何更改/删除图表的标题?应该使用 ggplotly 还是 ggplot 来完成?
【问题讨论】: