-1

How can the legend symbol size be changed in plotly?

I have tried numerous properties within plot_ly() main function and layout(), but nothing has worked so far:

enter image description here

ggplot2 equivalent for what I need would be simply: theme(legend.key.size = 10)

user438383
  • 4,338
  • 6
  • 23
  • 35
johnnyk
  • 1
  • 1
  • Please make this question *reproducible*. This includes sample code you've attempted (including listing non-base R packages, and any errors/warnings received), sample *unambiguous* data (e.g., `data.frame(x=...,y=...)` or the output from `dput(head(x))`), and intended output given that input. Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans Jun 03 '22 at 11:42
  • not sure if it will help, but you can try `%>% layout(legend= list(itemsizing='constant'))` to get around the tiny dots? – VvdL Jun 03 '22 at 11:49
  • Unfortunately no changes with legend property you provided. I will just open a new question with a reproducible example – johnnyk Jun 03 '22 at 12:19
  • No need to open a new one, just [edit] this one. – r2evans Jun 03 '22 at 12:49
  • To change the size of the legend you can use `layout(legend = list(font = list(size = 30)))` – Kat Jun 04 '22 at 16:12

0 Answers0