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?
Asked
Active
Viewed 37 times
0
-
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