Closed
Description
Hi Carson,
ggplot2
works fine for the wrapping of long labels, while ggplotly
doesn't support yet. A little example is as follows:
library(plotly)
library(stringr)
df_x <- data.frame(
x = "this is very loooooooooooong text to illustrate",
y = 100
)
p <- ggplot(aes(x = x, y = y), data = df_x) +
geom_bar(stat = "identity") +
scale_x_discrete(labels = function(x) str_wrap(x, width = 10))
p
ggplotly(p)
Cheers,
Earo
Metadata
Metadata
Assignees
Labels
No labels