0

The question may seem odd at first. However, what I would like to achieve is to plot the legend in the sidebar of a flexdashboard and the main plot into a chart. Has anyone an idea how to do it?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
chrijo
  • 1
  • You can do that with cowplot (https://wilkelab.org/cowplot/reference/get_legend.html); would that approach suit your use-case? – jared_mamrot Jul 20 '22 at 08:16
  • I tried this, but the extracted legend can't be passed to ggplotly. The legend from ggplot is static, however I need an interactive one from plotly. – chrijo Jul 20 '22 at 09:53

0 Answers0