I have made a ggplot
library(ggplot2)
library(ggplotly)
f1 <- diamonds |> group_by(cut,clarity,color) |> count() |>
group_by(cut) |> mutate(N=sum(n)) |>
ggplot() +
aes(
x = cut,
y = n,
fill = cut
) +
geom_col() +
theme(legend.position = "none")+
coord_flip()+
facet_wrap(vars(clarity))
f1
I want to convert to ggplotly
object
ggplotly(f1)%>%
layout(legend=list(font = list(size = 8)),
xaxis = list(titlefont = list(size = 8), tickfont = list(size = 8)),
yaxis = list(titlefont = list(size = 8), tickfont = list(size = 8)))
However, the size of text is only changed in the 1st subplot. I would like to have the size applied to all subplots:
The issue is I have it in a function so number of facets varies, so this post was not helpful: R ggplotly with facet_wrap : axis tick size not changing for all plots