You can change the font size of the legend using legend.text
in your theme
like this:
library(dplyr)
library(ggplot2)
library(plotly)
p <- iris %>%
ggplot(aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
geom_point() +
theme(legend.text=element_text(size=3))
ggplotly(p)
p <- iris %>%
ggplot(aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
geom_point() +
theme(legend.text=element_text(size=15))
ggplotly(p)
Created on 2022-07-15 by the reprex package (v2.0.1)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.