2
如何將圖表標題對齊到plot_ly
對象(如從ggplotly
創建)?左對齊圖表標題
library(ggplot2)
library(plotly)
p <-
ggplot(mtcars, aes(mpg, cyl)) +
geom_point() +
ggtitle("My Title") +
# Not necessary by default:
theme(plot.title = element_text(hjust = 0.0))
p
ggplotly(p)
p
(要的標題對齊)的輸出:
ggplotly(p)
(不保留標題排列):