By default, Plotly only creates legend on the right - use to modify position and label
accordingly
Usage
plotly_legend(fig, lg_pos = "bottom", lg_lab = "", dir = "h")
Arguments
- fig
Plotly or subplot object as input (with ggplot legend position none)
- lg_pos
Legend Position. Values: "right","left","top","bottom", c(1,2), c(5,7) etc
- lg_lab
Legend Title Text; if any.
- dir
Direction of legend. Values: "h", "v", "horizontal", "vertical"
Value
Plotly object with legend positioned and titled according to input